Albion Rovers kept their Division Two place by clawing back a 2-0 first leg deficit and beating Third Division Stranraer in a penalty shoot-out.
Scott Chaplain and Robert Love put Rovers in front before Martin Grehan gave Stranraer a 3-2 aggregate lead.
But Chaplain grabbed his second from the spot and it remained level on aggregate throughout extra-time.
Ciaran Donnelly's penalty won it for Rovers before his manager Paul Martin resigned because of ill health.
With the first goal crucial, it was the hosts who set the pattern for an exciting afternoon as Chaplain received the ball off Love from the right and found the bottom corner from 12 yards after just six minutes.
Love turned goalscorer midway through the first half when he drilled into the top corner from a similar position, but the advantage remained for just two minutes as Grehan fired home a well-taken effort from the edge of the area.
A thrilling eight-minute passage of play took another twist when Grant Gallagher handballed in the area and Chaplain stepped up to power home the resulting penalty and make it 3-1 on the day.
And that was the way it stayed despite both sides enjoying a host of second-half chances to clinch matters, while Grehan saw a shot turned around a post by Gaston in the first half of extra-time.
Rovers manager Martin announced after the match that he was resigning after four years in charge.
He told BBC Scotland: "I missed a month of the season in February through illness and the illness has come back again.
"I just can't seem to shake it off. I think the right thing to do for me, my family and the club is to stake a step back.
"I just need a break. With my work, my family and the football I was running myself into the ground and wasn't giving myself an opportunity to recover.
"The club is in safe hands. Todd Lumsden will take over.
"We have a great steady ship there with my chairman.
"It's a fantastic day for the club. It's a great credit to everybody associated, especially the players."
Albion Rovers: Gaston, Reid, Ciaran Donnelly, Stevenson, O'Byrne, Ferry (Werndly 15), Boyle (Russell 46), Love, Canning, Chaplain (McStay 60), Acqua. Subs Not Used: Fahey, Pierce.
Booked: McStay, Reid.
Goals: Chaplain 6, Love 25, Chaplain 33 pen.
Stranraer: David Mitchell, Taggart, McGregor, McKeown, Noble, Winter (Borris 62), Christopher Aitken, Stirling, Gallagher (Stuart McColm 111), Malcolm (Moore 70), Grehan. Subs Not Used: Marshall, Belkouche.
Booked: Noble, Moore.
Goals: Grehan 27.
Referee: Brian Winter