Jamie Cureton ensured Cheltenham's League Two survival with a brace to shoot down Mansfield 2-0 at the One Call Stadium.
The result also ended any faint hopes the Stags, who were seven games unbeaten, had of making the play-offs.
Cheltenham had the ball in the net after only four minutes, but an offside flag ruled out Byron Harrison's header.
In a first half of few chances, Ryan Tafazolli sent a powerful header over the Robins' crossbar from a 22nd-minute James Jennings corner.
But the visitors came the closest to scoring just after the half-hour mark when Matt Richards got a touch on a low Jermaine McGlashan cross only to see goalkeeper Lewis Price somehow block with his hand from point-blank range.
The deadlock was finally broken after 57 minutes as Harrison ran at the home defence before slotting an inviting pass in front of Cureton to smash home a rising finish from 10 yards out.
The veteran then sealed victory 11 minutes from time as he nipped in to intercept a short Martin Riley backpass, taking the ball wide of Price before chipping him to perfection from the left-hand side.