Match ends, Alloa Athletic 4(4), Brechin City 3(5).
James Dale scored the winning penalty as Brechin City won promotion to the Scottish Championship.
City’s victory elevates them to the second tier for the first time since 2006, despite finishing fourth in League One, 12 points behind Alloa.
Dale had put Brechin two ahead on aggregate but a Greig Spence double put the tie in the balance by half-time.
Paul McLean and Liam Watt scored after the break for Brechin but Spence then Dylan Mackin dragged Alloa level.
Spence, who should have been the Alloa hero with his hat-trick, missed in the shoot-out, but so did Andy Jackson of Brechin, which meant sudden death.
Iain Flannigan struck the post with his effort, leaving Dale to complete a glorious evening for Darren Dods and his men.
After the play-off final first leg finished 2-1 in Brechin’s favour at Glebe Park, the return fixture proved remarkable throughout.
It looked like the tie had taken a significant turn in City’s favour when Dale curled a spectacular effort over Neil Parry and into the top corner from 25 yards.
That gave them a two-goal advantage on aggregate, to the delight of the couple of hundred visiting supporters.
But within a minute, Alloa had a lifeline when Brechin’s central defender McLean dived to his left to stop Mackin’s goal-bound shot with his arm.
McLean escaped with a yellow card but Spence sent Graeme Smith the wrong way from the penalty spot to resurrect home hopes of turning the tie around.
And Alloa’s top scorer, restored to the starting line-up having been on the bench for the first leg, levelled things as he glanced in Scott Taggart’s pinpoint cross just before the break.
There was to be a further twist, though. McLean, having been allowed to stay on the park after the penalty incident, forced the ball over the line from a Brechin corner, to once again give his side the edge.
But Spence wasn’t about to give up his place in the headlines and promptly rounded off a fabulous Alloa move with an overhead kick past Smith to seal his treble.
With the game edging towards extra-time, Brechin produced a superbly-crafted goal of their own to regain the advantage, with Watt cutely clipping the ball over the keeper and into the net.
Again, though, there was a swift response from the home team – an emphatic header from Mackin squaring the tie once more.
A fraught period of extra-time brought no further goals. Both sides had progressed to the final on penalties and it felt a fitting way in which to decide such a closely-fought two-legged encounter.
Ultimately, Brechin came out on top, consigning Alloa to another season of League One football.
Brechin City manager Darren Dods: “We were the underdogs going into the play-offs, against Raith Rovers, we came through that, and against Alloa coming here.
“All credit to Alloa, they kept clawing us back, but we never gave up, we had injuries and boys cramping up, but we hung in there and won – it’s an amazing achievement.
“For Brechin, the smallest town in Angus, to get there with this group of players, probably the smallest squad in the league, it’s unbelievable effort from the players that’s got us there.”
Alloa Athletic manager Jim Goodwin: “The boys are absolutely devastated as you can imagine. It’s probably as low a point in my career as I can remember in 20 years of being a professional. I’ve suffered relegations in the past and other disappointments but this probably tops the lot.
“The team have done so well for the majority of the season. I think we were the second best team in the league. But we know going into the play-offs, league form counts for nothing.
“To score four goals at home, you think that’s got to be enough but the goals against are disappointing. But I’d like to congratulate Darren Dods and his staff and players and we wish Brechin well in the Championship.”
Live Text
Penalty Shootout ends, Alloa Athletic 4(4), Brechin City 3(5).
Goal! Alloa Athletic 4(4), Brechin City 3(5). James Dale (Brechin City) converts the penalty with a right footed shot to the top right corner.
Penalty missed! Still Alloa Athletic 4(4), Brechin City 3(4). Iain Flannigan (Alloa Athletic) hits the left post with a right footed shot.
Goal! Alloa Athletic 4(4), Brechin City 3(4). Ally Love (Brechin City) converts the penalty with a left footed shot to the centre of the goal.
Goal! Alloa Athletic 4(4), Brechin City 3(3). Calum Waters (Alloa Athletic) converts the penalty with a left footed shot to the bottom right corner.
Goal! Alloa Athletic 4(3), Brechin City 3(3). Alan Trouten (Brechin City) converts the penalty with a right footed shot to the bottom left corner.
Goal! Alloa Athletic 4(3), Brechin City 3(2). Andy Graham (Alloa Athletic) converts the penalty with a right footed shot to the bottom left corner.
Penalty saved! Andy Jackson (Brechin City) fails to capitalise on this great opportunity, right footed shot saved in the bottom left corner.
Goal! Alloa Athletic 4(2), Brechin City 3(2). Jordan Kirkpatrick (Alloa Athletic) converts the penalty with a right footed shot to the bottom right corner.
Goal! Alloa Athletic 4(1), Brechin City 3(2). Dougie Hill (Brechin City) converts the penalty with a left footed shot to the bottom left corner.
Penalty saved! Greig Spence (Alloa Athletic) fails to capitalise on this great opportunity, right footed shot saved in the bottom right corner.
Goal! Alloa Athletic 4(1), Brechin City 3(1). Willie Dyer (Brechin City) converts the penalty with a left footed shot to the bottom left corner.
Goal! Alloa Athletic 4(1), Brechin City 3. Scott Taggart (Alloa Athletic) converts the penalty with a right footed shot to the bottom right corner.
Penalty Shootout begins Alloa Athletic 4, Brechin City 3.
Second Half Extra Time ends, Alloa Athletic 4, Brechin City 3.
Delay in match Dougie Hill (Brechin City) because of an injury.
Attempt missed. Liam Watt (Brechin City) right footed shot from a difficult angle and long range on the left is close, but misses the top right corner.
Corner, Brechin City. Conceded by Andy Graham.
Attempt blocked. Ally Love (Brechin City) right footed shot from the left side of the box is blocked.
Alan Trouten (Brechin City) is shown the yellow card for a bad foul.
Iain Flannigan (Alloa Athletic) wins a free kick in the defensive half.
Foul by Alan Trouten (Brechin City).
Foul by Adam Martin (Alloa Athletic).
Paul McLean (Brechin City) wins a free kick in the attacking half.
Foul by Graeme Holmes (Alloa Athletic).
Alan Trouten (Brechin City) wins a free kick on the right wing.
Attempt missed. Alan Trouten (Brechin City) right footed shot from the centre of the box is just a bit too high.
Attempt blocked. Ally Love (Brechin City) left footed shot from outside the box is blocked.
Corner, Brechin City. Conceded by Frank McKeown.
Attempt missed. Jordan Kirkpatrick (Alloa Athletic) right footed shot from outside the box misses to the left.
Corner, Alloa Athletic. Conceded by Aron Lynas.
Foul by Andy Graham (Alloa Athletic).
Andy Jackson (Brechin City) wins a free kick in the defensive half.
Second Half Extra Time begins Alloa Athletic 4, Brechin City 3.
First Half Extra Time ends, Alloa Athletic 4, Brechin City 3.
Attempt missed. James Dale (Brechin City) right footed shot from outside the box is too high.
Attempt saved. Greig Spence (Alloa Athletic) left footed shot from the centre of the box is saved in the centre of the goal.
Aron Lynas (Brechin City) is shown the yellow card for a bad foul.
Adam Martin (Alloa Athletic) wins a free kick in the attacking half.