Falkirk needed an 118th-minute winner from Blair Alston to beat Queen of the South 3-1 in the second leg of their Scottish Championship playoff quarter-final.
The visitors, who led 2-1 from the first leg, started to take control midway through the first half, and were inches away from extending their advantage on aggregate when Ian McShane's free kick was tipped wide by Michael McGovern.
Queen of the South's dominance in the first half was rewarded in the 36th minute when Robert McHugh twisted his way into some space inside the box before firing home the first goal of the second leg.
Falkirk should have pulled a goal back before the break, but Jonathan Flynn somehow managed to miss the target from just a couple of yards out after finding space.
A slightly hectic start to the second half saw Falkirk find the back of the net as Rory Loy latched on to a loose ball to drill the ball past Zander Clark.
The hosts grew in confidence after pulling a goal back, and they managed to level the tie in the 70th minute when Craig Sibbald lost his marker inside the box to head home his team's second to make it 3-3 on aggregate.
Extra time was required in the quarter-final, and it was Alston who stole the headlines by tapping in Scott Shepherd's cross to send his side through.