Formartine United left it late before grabbing the winner against lowly Rothes on Speyside on Saturday.
New signing Stuart Anderson struck deep into stoppage time to give the Pitmedden side a 3-2 victory just when the hosts thought they had deservedly earned a point.
The win keeps United in the title hunt but two points behind leaders Brora Rangers, who have three games in hand.
It was an error-strewn performance from Formartine, who looked no more like a team from the top three than Rothes did from the other end of the table.
The visitors started hesitantly and the Speysiders showed they were determined to chase down everything.
It was no surprise when they took the lead in the 32nd minute. A long ball forward from Thomson found Forbes who netted following a one-two with Dey.
Two minutes later and United were level when Cammy Keith bulleted home a close range header from an Anderson free-kick.
The second half opened with Formartine in apparently much more resolute mood and wave after wave of attack had the home side firmly pinned back in their own area.
They went in front when Anderson forced his way past a couple of defenders following good work by McVitie to slide the ball into the net from close range.
United tried to add to their lead but were defied by a stirring backs-to-the-wall display by the home side.
And they were rewarded with an equaliser seven minutes from time.
A long ball over the top reached Sean McIntosh just beyond the half-way line. The striker took off and rounded the advancing Shearer and clipped the ball neatly into the net.
The Formartine onslaught continued as the Moray men tried to run down the clock. It looked like they would succeed until well into added time.
Anderson – already the best player on the park - produced the goods by delivering the ball through a ruck of defenders and past Horne to scrape the win.
Rothes: Horne, Stewart, Thomson, Gallagher, Shortreed, Dunn, C McIntosh, Dey, S McIntosh, Forbes, Ross. Substitutes: Rodrigues, Corbett, Smith, Ramsay, McKendrick.
Formartine United: Shearer, Jeffrey, Smith, McKeown, Campbell, Anderson, Park, McVitie, Keith, Ewen, Bagshaw. Substitutes: Napier, Munro, Dingwall, Clark, Calder.