Substitute Stephen Maguire struck late on as Peterhead bounced back from consecutive defeats to climb into the promotion places with a 1-0 over Berwick at Balmoor.
Blue Toon striker Rory McAllister was denied by Rangers goalkeeper Youssef Bejaoui early on before Chris Townsley's header was parried by Paul Jarvie at the other end.
The visitors again went close in the 33rd minute when Philip Addison tested Jarvie from distance before match-winner Maguire made the decisive contribution nine minutes after replacing Robert Winters.
The 25-year-old striker, signed from East Stirling in the summer, found space six yards out to turn Bryan Deasley's pass into the bottom left-hand corner with 13 minutes remaining.
Paul Hutchinson's men were unable to find a response as they slipped to a third consecutive away league defeat.