Three goals in quick succession gave Hearts an unlikely win over Ross County at Tynecastle.
Steffen Wohlfarth's impressive strike put the visitors in front.
Michael Ngoo nodded Hearts level just after the break only for Wohlfarth to regain the lead for the Staggies with a powerful header of his own.
But Jason Holt equalised with a stunning volley, Evangelos Ikonomou's own goal put the hosts ahead and Ngoo netted his second with a low strike.
County remain six points off a European spot and Hearts' win may also have implications for Dundee, who could be relegated later on Saturday depending on results.
Wohlfarth was keen to make his presence known and an early shot from the German ricocheted up off a defender before his eventual header was collected by Jamie MacDonald.
But the goalkeeper was helpless midway through the half as Wohlfarth collected near the byeline, burst past Jamie Hamill and swept a powerful shot into the far corner from the inside left channel.
And Ivan Sproule should have doubled the visitors' lead when he pounced upon a short passback by Brad McKay.
The former Hibernian winger was clean through but struck straight at MacDonald, who clawed away the rebound before Wohlfarth could capitalise.
Kevin McHattie came close to a leveller when he moved upfield to fire a shot off the outside of the right-hand post but County were soon back on the attack.
Sproule turned Mihael Kovacevic's low centre towards goal and MacDonald again scrambled clear.
After such a dominant first half, the lack of a second goal may have been a concern for the travelling fans.
And their fear of a Hearts comeback was realised as Ngoo rose above the County defence to direct McHattie's cross past Michael Fraser.
However, another powerful header, this time by Wohlfarth, edged Derek Adams' side back into the lead as Iain Vigurs' inviting corner was dispatched into the net.
Jamie Walker, Holt and Danny Wilson could not hit the target as Hearts tried to battle back a second time.
But Holt eventually beat MacDonald with a stunning left-foot volley after a corner had been cleared to the edge of the box.
And, within seconds, Ikonomou turned the ball into his own net after Walker had nudged the ball towards goal.
Ngoo then beat Fraser at his near post with a low driven shot and Hearts fans were savouring the prospect of victory a matter of minutes after contemplating defeat.
Kovacevic could have set up an interesting last few minutes but lifted his shot over with the goal gaping.