Rory McAllister, took his total for the season to 32 with two second half strikes, including one from the penalty spot.
Berwick skipper Lee Currie had given Rangers a first half lead with a trademark free kick, which for a spell, gave the team some hope that they might achieve a top four finish.
Berwick, who had won four of their previous five, went into the game against the champions knowing that nothing less than victory would do to keep their play-off hopes alive, whilst they were also dependant on Stirling Albion losing against Clyde
In the opening exchanges a Lee Currie corner was pushed onto his post by goalkeeper Graeme Smith.
Smith also made a good save from Scott Dalziel who turned his marker on the edge of the box before getting in his shot.
After 20 minutes a looping header from Darren Lavery looked to be goalbound, but Smith managed to scramble back and clear the ball off the line.
The deadlock was broken after 33 minutes when Currie scored with a fantastic free kick from 30 yards out, which beat Smith low to his left.
At half-time Berwick made a change with Dean Hoskins replacing Ross Gray, but it was Peterhead who started the second half stronger.
Ben Miller made a good run on the right side of the box for Rangers, but his strongly-driven cross was hit straight at Smith.
Rory McAllister, who is the league’s leading scorer, had two free kicks from similar positions about 25 yards out, but both were hit over the top.
But after 61 minutes he atoned for his misses when he slammed a loose ball into the net from 15 yards out after an initial shot had been blocked.
Berwick upped their game and Michael Dunlop made a strong run down the right and crossed for Dalziel in the centre, but he was unable to get any power in his shot which was hit straight at Smith.
Minutes later Berwick were desperately unlucky when Hoskins saw an effort come back off the crossbar and Lavery’s header from the rebound was cleared off the line by Brian Gilfillan.
But there was heartbreak just around the corner when Ryan Strachan was tripped by Jonny Fairbairn after 79 minutes and McAllister stepped up to score his second from the penalty spot.
Berwick: Bald, Dunlop (Jacobs 84), Drummond, Miller, Fairbairn, Tulloch, Gray (Hoskins 46), L Currie, Russell, Dalziel (Carse 89), Lavery.
Subs: Jacobs, Hoskins, Carse, Morris, Cameron, Andrews.
Bookings: Miller 51 foul;
Peterhead: Smith, Sharp, Noble, Smith, Ross, Cowie, Cox (Rodgers 69), McLaren (McCann 73), McAllister (Brown 85), Gilfillan, Strachan.
Subs: Rodgers, McCann, Brown, Richardson, Low, McGlinchey, Jarvie.
Bookings: Rodgers 81 foul; McCann 82 foul;
Referee: Mike Taylor.