It was second against fourth at Balmoor Stadium with the home side aiming to keep the pressure on leaders Edinburgh City.
Peterhead made the perfect start going in front in the second minute.
An attack down the right saw the ball played to the left side of the penalty area.
Full back Paddy Boyle clipped a beautifully weighted and directed pass to the far post and ace predator Derek Lyle, in for Rory McAllister, side footed in to give his side the early initiative.
The visitor’s response came from a free kick seven minutes later, Ryan Sinnamon whipping the ball in from the left wing and Aidan Smith with a full length diving header from six yards out past the right hand post.
But Annan should have levelled after 19 minutes. A careless header towards his own goal 20 yards out by Willie Gibson fell way short of its intended target, Greg Fleming, and it took a smart save by the keeper to save Gibson’s blushes as Athletic striker Tommy Muir bore in on goal.
Peterhead dominated from the restart but a shot from distance from Gibson comfortably held by keeper Alex Mitchell was the nearest they came to suggest a second goal was imminent.
A Jamie Stevenson free kick from the wing and an unconvincing header from Russell McLean on the hour kept the visitor’s defence on their toes but they did occasionally threaten themselves and a Tommy Muir run and low shot wasn’t far away.
The home side brought on Rory McAllister and Ross Kavanagh and the latter should have done better as Peterhead broke forward from an Annan corner but a heavy first touch and the momentum was lost.
Then ten minutes from the end was a moment of controversy. Referee David Dickinson spotted an offence by Jason Brown that nobody else in the stadium did and after he was cautioned, Tony Wallace lashed home the penalty and it was all square in the strangest of circumstances.
But just when a draw looked on the cards the Blue Toon struck again, a thunderous shot from Russell McLean high into the net in the 84th minute and justice was done.
Peterhead boss Jim McInally paid tribute to his players for battling back to grab the late winner.
“We got an early lead and were on the front foot in the first half but I said to the players at half time that there was always going to be a threat,” he said.
“Annan did just that and dominated without looking like they were going to hurt us then strangely when they got the penalty they sat back and let us back into the game.
“We then had plenty of chances to win it but we didn’t play well in the second half.
“The referee said the penalty was for pulling which is bizarre when the ball was so far away, but it was the linesman that gave it, not the referee.
“It was odd that the linesman got involved in something that was so far away from where the ball was but at the time Annan deserved it.
“I have told Jason (Brown) before about pulling and to keep his hands down but unfortunately the linesman was watching and gave the penalty.
“At least we had the character to fight back.”
A tactical switch saw Peterhead chase the winning goal.
“I felt the best form of defence was attack and that is why I went with three up front,” he added.
“I thought Russell had a decent day and it was a fantastic goal from him.”