Dundee United cemented their place in the top six with victory over league cup winners Livingston, but that tells only part of the story.
With 11 minutes left, Livi led 2-1 thanks to a stunning half-volley from substitute Scott McLaughlin only for United's own super-sub Collin Samuel to pull them level barely two minutes after taking the field.
United would have deserved a point as Andy McLaren had earlier hit the bar with a looping header, but better was to come for the visitors with McLaren's 83rd minute cross being nodded home by top scorer Jim McIntyre.
Livingston had started with a swagger on the back of three straight wins, but United were unfazed and took only four minutes to worry keeper Roddy McKenzie as striker Jason Scotland fired narrowly wide from 20 yards.
Charlie Miller's driving run and angled shot maintained the pressure on the home side and although Livingston hit back with a long range free-kick from Lee Makel, United deservedly went ahead in the 13th minute.
Miller's cheeky back-heel unlocked the home defence and allowed Scotland to stride into the box and hammer a left-foot drive past McKenzie.
The goal opened up the game even more and after skipper Stuart Lovell had missed a half chance for Livi, defender David McNamee had to clear a dangerous Scotland cross which had eluded McKenzie.
Livingston then equalised shortly before half-time following a dramatic passage of play.
At one end Miller clipped the ball over McKenzie only to see it hacked off the line by Marvin Andrews and within 15 seconds Livi had launched a counter-attack which ended with McNamee firing in off the post from eight yards.
United recovered to finish the first period on top, but Livingston finally hit their stride going into the final third of the contest with the ever-threatening David Fernandez bringing the best out of keeper Paul Gallacher from just outside the penalty area.
The Spaniard then set up a simple chance which top scorer Derek Lilley somehow scooped wide at the back post.