Dunfermline Athletic staged an amazing comeback to retain hopes of avoiding relegation against Forfar Athletic.
Forfar went 1-0 up on six minutes - 4-1 on aggregate - but were down to eight men as Dunfermline dragged it back to 3-1 on the day, 4-4 overall.
Allan Smith finally put the Pars ahead on aggregate 12 minutes into extra time, before a Stephen Husband double.
Dunfermline, who are in administration, will now meet Alloa in the First Division play-off final.
The winners will play in Division One next season.
Iain Campbell put Forfar ahead direct from a corner, before Mark McCulloch was sent off for bringing down Smith inside the penalty area.
Dunfermline's Husband fired wide from the spot.
Mick Dunlop inadvertently sent a Smith cross past his own goalkeeper to equalise on the day - and he was then dismissed for a cynical challenge on Alex Whittle.
Angry Forfar boss Dick Campbell then clashed with Dunfermline coach Neil McCann and both were sent to the stands.
The Pars went on to add a second through Ryan Thomson's 20-yard strike and made it 3-1 when Ross Millen converted a penalty after Omar Kader was penalised for handball.
Campbell's dismissal for his protests left his team with eight men heading into extra-time. And Forfar crumbled as Smith slotted in a fourth from just inside the area, before Husband added a brace.
His first was a superb 25-yard drive and the second a low drive from 12 yards to secure a 6-1 win on the day at East End Park and 7-4 aggregate success.
Dunfermline: Hrivnak, Millen, Young, Potter, Whittle (Kane 111), Geggan (Byrne 91),Husband, Falkingham, Wallace (Dargo 11),Smith, Thomson. Subs Not Used: Goodfellow, El Bakhtaoui.
Goals: Dunlop 36 og, Thomson 62, Millen 83 pen, Smith 102, Husband 110, 118.
Forfar: Hill,Dunlop, McCulloch, Bolochoweckyj, Iain Campbell, Hilson (Sellars 93), Robertson, Malin (Brown 71), Ross Campbell (Kader 46), Templeman, Swankie. Subs Not Used: Salmon, King.
Sent Off: McCulloch (15), Dunlop (54), Iain Campbell (85).
Booked: Templeman, Bolochoweckyj, Iain Campbell, Brown.
Goals: Iain Campbell 6.
Ref: Stevie O'Reilly