Halifax Town were unable to spoil Cheltenham Town’s promotion party as Dan Holman’s brace left Jim Harvey’s men anxiously looking over their shoulders with three matches remaining.
Holman struck in the 24th and 33rd minutes to put the Robins firmly on course for an immediate return to the Football League.
Halifax threatened in the 17th minute after Kingsley James robbed Kyle Storer and fed Jordon Burrow, whose shot hit Cameron Burgess and then James miscued the loose ball wide.
Only some alert goalkeeping from Sam Johnson denied Holman at the near post in the 21st minute.
But Halifax gave the National League’s deadliest marksman too much space when Asa Hall combined with James Dayton to set him up and he curled a perfectly measured shot past Sam Johnson’s outstretched hand three minutes later.
Halifax were pinned back inside their own half for most of the first period and they were unable to trouble goalkeeper Jon Flatt.
James went the closest to pulling one back, seeing his well-struck effort flash just wide of the left post after the ball was cleared to him on the edge of the box in the 26th minute.
Hall sent a shot just wide for Cheltenham after half an hour before Jake Hibbs was cautioned for a late challenge on Storer.
It was 2-0 to the home side nine minutes later when James Bolton handled Storer’s ball into the box and Holman sent Johnson the wrong way from the spot.
Harvey reacted by replacing central defender Hamza Bencherif with Connor Hughes before the break.
James sent a ball across the six yard box in the opening minute of the second half as Halifax looked to find a way back into the game, but nobody could get a touch.
Johnson had to be at his best in the 50th minute to touch Burgess’ header over the bar after Dayton’s free-kick into the box.
The Shaymen’s number one was called into evasive action again straight away, diving to his left to parry Amari Morgan-Smith’s effort from close range.
MacDonald was a threat on the right for Halifax and he found Peniket in the box in the 54th minute after robbing George McLennan, but Dan Parslow made a timely intervention.
Hibbs was not far away with a free-kick in the 60th minute, but Flatt had it covered as it cleared the bar.
Hibbs then danced his way into the box with some neat footwork, but Parslow made a headed clearance to keep Halifax out.
MacDonald sent a shot over from 20 yards out and Kevin Roberts headed into the side netting as Cheltenham seemed content to sit back and protect their advantage.
Halifax hit the post in the dying seconds before a pitch invasion ensued.
It was enough for Gary Johnson’s side to secure the title, with Forest Green Rovers held at home by Woking.
Halifax, meanwhile, host play-off chasing Eastleigh on Tuesday night and then second placed Forest Green on Saturday, facing an almighty battle to preserve their own National League status.
Cheltenham Town (3-5-2): Flatt; Dickie, Parslow, Burgess; Barthram (Cranston 74), Storer (Munns 46), Hall, Dayton (Waters 74), McLennan; Holman, Morgan-Smith. Subs not used: Kitscha, Rowe.
Halifax Town (4-5-1): Johnson; McManus, Bencherif (Hughes 36), Roberts, Bolton; MacDonald, James, Hibbs, Wroe, Peniket (McDonald 64); Burrow. Subs not used: Porter, Hattersley, Fazlic.
Referee: J Busby.
Star Man: Kingsley James.