The league leaders opened the scoring after two minutes when Ryan Dow’s corner was turned into his own net by Callum Wilson.
The Moray hosts responded well, with Greg Morrison heading them level in the 18th minute. But Jack Leitch soon restored Peterhead’s advantage with a neat finish after good work from Rory McAllister.
Elgin’s Ross MacIver then saw his 43rd minute penalty saved by Greg Fleming, and Peterhead managed to hang on for a crucial three points despite having Michael Dunlop sent off in the closing stages.
Second-placed Clyde remain in contention after administering a 5-0 thrashing on bottom side Berwick Rangers who must win both their remaining games to have a chance of avoiding a relegation play-off.
After Barry Cuddihy’s fifth minute opener, Scott Rumsby doubled Clyde’s lead with a 49th minute header. John Rankin’s free-kick swiftly put the Bully Wee three ahead, after which further goals from David Goodwillie and Chris McStay heaped yet more misery on troubled Berwick.
Ninth-placed Albion Rovers can secure their league status with a draw at Berwick next Saturday after the Coatbridge club twice came from behind to beat third-placed Edinburgh City 3-2 at Cliftonhill.
Blair Henderson gave City a fifth minute breakthrough, only for Rovers’ Smart Osadolor to volley the hosts level four minutes later.
Craig Thomson’s free-kick restored City’s lead moments after the restart, but Gary Phillips then netted Rovers’ second equaliser of the game before Osadolor struck with another sumptuous volley in the 77th minute.
Annan Athletic warmed up for the play-offs with a comprehensive 3-0 success at Queen’s Park courtesy of Aidan Smith’s double and a Tommy Muir header.
Cowdenbeath climbed to seventh as David Cox’s 57th minute free-kick proved sufficient to earn a 1-0 victory at Forthbank over fifth-placed Stirling Albion.