A stunning 30-yard goal from Andy Monkhouse gave the Pools an early lead, before two impressive long-range strikes from Compton put his side 3-0 up.
The Stags pulled a goal back through Sam Clucas as he drilled home a spot-kick, but faint hopes of a comeback were ended as James Poole sealed the points for the visitors, with a fine strike from outside the area.
The Stags made a slow start as Anthony Howell was booked in the first minute for a late challenge on the impressive Compton.
Our first chance came after five minutes, when James Jennings’ superbly lofted free-kick found John Dempster, who flicked the ball into the path of Ryan Tafazolli, before the defender headed against the post.
Moments later, Jamie McGuire found Calvin Andrew in the penalty area, but his header went well wide of Scott Flinders’ post.
Despite some short spells of pressure from The Stags, it was Hartlepool who struck first, as Monkhouse hit a long-range effort from 30 yards, which sailed past Alan Marriott on seven minutes.
It took a while for the hosts to get out of first gear as Ben Hutchinson’s fine ball found Jennings at the back post, who disappointingly headed wide.
On 19 minutes, The Stags endured a heart in mouth moment as Luke James went down inside the area, but referee Graham Horwood instantly awarded Mansfield a free-kick, before option to book the Pools’ striker for diving.
A few minutes later, Hartlepool were on the attack again, when Compton forced a fantastic save from a fully-stretched Marriott.
Manager Paul Cox then opted to make a tactical change, bringing on midfielder Lindon Meikle for centre-back Tafazolli, on 24 minutes.
The Pools appeared to grow in confidence and almost doubled their lead as Simon Walton’s well-timed cross was flicked on by Poole towards Compton, who blazed his effort over.
The visitors went close again just seconds later, when another excellent delivery from a Neil Austin free-kick, found Christian Burgess, who headed straight at Marriott from just a few yards out.
Mansfield suffered another blow just before half-time, when Compton cut inside and drilled his powerful 20-yard attempt past Marriott at his near-post, giving the Pools a two-goal advantage.
After the re-start, Cox made his final two changes in order to inspire a comeback, as Ollie Palmer and Matt Rhead replaced Andrew and Hutchinson.
Rhead made an instant impact, putting Clucas through on goal, but the youngster hammered his shot just inches wide.
On 49 minutes Compton grabbed his second goal of the match, which put The Pools into an almost unassailable 3-0 lead, with a 30-yard free-kick that was curled beyond a full-stretch Marriott.
The away team were hungry for more as Poole went close on 55 minutes, with a speculative shot that whistled over the woodwork.
The Stags couldn’t find their way past The Pools’ defence, which resulted in McGuire trying his luck from distance, but his effort fell straight into the hands of Flinders.
The midfielder once more tired his luck from far out, but this time his long-range shot went inches over Flinders’ bar on 70 minutes.
On 74 minutes, The Stags were awarded a life-line as Burgess handled inside the area, which resulted in a penalty.
Clucas then stepped up and drilled his spot-kick home giving Mansfield a slight glimmer of hope, with 15 minutes still to go.
However, any hopes of a comeback were dashed when Poole thumped an effort home to seal maximum points for Hartlepool, ending The Stags’ eight-match unbeaten run in the process.
Attendance: 3,457 (273 away supporters).