Andy Rodgers' stoppage-time penalty snatched victory for Peterhead in their Second Division play-off semi-final away to Queen's Park.
It secured a ninth win in a row for the side who finished second in the Division Three table thanks to a 3-0 win against the same opponents at the same venue on Saturday.
The Spiders had rested several players for that match, while Blair Spittal was back after illness and Giuseppe Capuano returned following suspension.
And it looked like they would deny Peterhead a victory, despite the visitors' domination, until Rodgers struck with the last kick of the game from the spot.
Peterhead, who finished second 24 points behind champions Rangers, started the strongest and only a double save from Neil Parry kept Queen's Park on level terms.
He denied Rory McAllister, Peterhead's top scorer having returned from suspension, on both occasions, first from inside the six-yard box and then from 12 yards.
Both sides found it difficult to create clear-cut chances, but it was the Blue Toon who again came closest midway through the second half when Rodgers' lobbed effort skimmed the top of the bar.
Parry made another save, this time denying David Cox, but he could not keep out Rodgers' penalty at the death after he had been fouled by Spittal.
: Parry, Spittal, Gallacher, Brough, Robertson, Anderson, Longworth, McParland, Connolly, Keenan (Quinn 75), Burns (Shankland 81). Subs Not Used: Lochhead, Gibson, Giuseppe Capuano.
: Graeme Smith, Sharp, Scott Ross, Ross Smith, Noble, Redman, Cowie, Strachan (McCann 73), Cox, Gilfillan, McAllister (Rodgers 61). Subs Not Used: Jarvie, McGlinchey, Fitzgerald.
: Rodgers 90 pen.
: John McKendrick