James Redman 53rd-minute winner ended Elgin City's 12-game unbeaten home run as Peterhead earned victory at Borough Briggs.
The Black and Whites looked likely to continue their good home form when Mark Nicolson headed home Daniel Moore's corner just 67 seconds into the game.
But the away side drew level seven minutes before half-time, Martin Bavidge applying the finish to Redman's assist.
The Blue Toon went ahead eight minutes into the second half when Bryan Deasley's corner found Redman, who headed his side into the lead.
The midfielder missed the opportunity to score his second moments later, when he shot wide when well-placed.
Substitute Graeme Beveridge had the chance to level the scores late on, but he was unable to beat Paul Jarvie from the edge of the area.
Clark, Niven, Duff, Nicolson, Durnan, Cameron (Beveridge 62), Leslie (Wilson 86), MacPhee, Moore, Gunn, Crooks (Millar 62). Subs Not Used: Calder, McMullan.
Duff, MacPhee, Niven, Clark, Durnan.
Jarvie, Donald, Tully, Russell Duncan, McBain, Sharp, Strachan, Redman, Deasley, McAllister (Wyness 77), Bavidge (Davidson 86). Subs Not Used: Jellema, Robertson, Webster.
Strachan, Redman, McAllister, Tully.
Bavidge 38, Redman 53.