Stuart Leslie's penalty was enough to see of play-off hopefuls Queen's Park as Elgin recorded a shock 1-0 win at Hampden Park.
The visitors almost took the lead inside the first minute but for Neil Parry's fine save to keep out Craig Gunn's stinging drive.
Gardner Speirs' side continued to press and went close through Lawrence Shankland and Blair Spittal.
The hosts tried to rally through Andrew Robertson but his effort was well saved by Joe Malin moments before the break.
Malin was called on immediately after the restart but produced another fine stop to deny Anthony McParland.
But it was the Spiders who eventually made the breakthrough after 57 minutes when James Brough fouled Paul Millar inside the area.
Leslie stepped up to convert the spot-kick before Spittal could only fire wide moments later as the game fizzled out.