Sam Stanton scored the winner as Dundee United came from behind to secure a 2-1 Ladbrokes Premiership play-off victory over Dunfermline.
United's promotion hopes were hanging by a thread at half-time after Declan McManus and Nicky Clark failed to convert great chances to add to the former's opening goal of the tie.
But United came to life after Scott McDonald's 57th-minute equaliser and Stanton waltzed through the visiting defence to book a place in the semi-finals against Livingston.
The visitors had more verve about them from the start, even off the pitch, where their fans were making more noise than a strangely subdued home support in the 7,994 crowd.
Dunfermline were rewarded for their positivity in the 14th minute when Fraser Aird turned Anthony Ralston and fired the ball towards the near post where McManus knocked home from a yard out.
Ralston was better going forward moments later but McDonald turned the ball just wide from a similar move.
United survived a series of balls into their box as the visitors consistently got round the outside of the home defence and the hosts had a massive let-off with 10 minutes left of the half when McManus failed to beat Deniz Mehmet after being played clean through.
United had another escape in the final second of the half when Clark headed Aird's cross against the bar from six yards, the striker congratulating Mehmet for getting a touch.
Mehmet saved from McManus in the opening moment of the second half and United continued to offer little until forcing a 57th-minute corner.
Lee Robinson looked set to catch Thomas Mikkelsen's header following a Billy King delivery but McDonald got a foot to the ball to force it home from underneath the goalkeeper's eyes.
The equaliser came at a cost as Mehmet had to be replaced by Harry Lewis after injuring himself while celebrating.
The substitute introduced himself with an excellent save from a McManus header as the game opened up and the 20-year-old Southampton loan player made another couple of saves in quick succession.
The home team and fans had been lifted by their goal though and they cut the Pars open with a sharp passing move that culminated in Stanton bursting past several players and poking the ball underneath Robinson in the 70th minute.
United defended their lead without major concern and now host Livingston on Monday.
Premiership News
Celtic clinch league title with 1-1 draw at Dundee United
Celtic clinched the Scottish Premiership title on Wednesday after a 1-1 draw at Dundee United, their 31st league game in a row unbeaten.
Celtic regain Scottish Premiership title in Ange Postecoglou's first season in charge
Celtic have regained the Scottish Premiership following Rangers' failure to beat Dundee United on Sunday.
Rangers deny Celtic effectively sealing Scottish title following feisty draw
Celtic squandered the chance to all-but secure the Scottish Premiership title following a 1-1 draw with Rangers at Celtic Park.
Celtic beat Rangers as SPFL title pendulum swings Hoops' way
Celtic took a giant stride to league title No.52 after a 2-1 win over Rangers in a pulsating Old Firm derby on Sunday.
Celtic beat rivals Rangers 3-0 to go top of Scottish Premiership
Reo Hatate marked his first Old Firm derby with two goals and an assist as Celtic thumped rivals Rangers 3-0 to go top of the Scottish Premiership.
Aaron Ramsey joins Rangers on loan from Juventus
Rangers have signed Juventus midfielder Aaron Ramsey on loan, the Scottish club announced on Monday.