Gary Mackay-Steven struck at the death to earn Dundee United a dramatic 2-1 victory at Inverness and deny their hosts the assurance of Europa League football.
Thistle cruised into the lead through Richie Foran as they set about securing international adventures for their fans for next season, but Ryan Dow's stunning volley and Mackay-Steven's late effort silenced the party.
There were chances at either end early on, with Andrew Shinnie's fourth-minute shot deflected for a corner and Caley keeper Reguero denying Stuart Armstrong with a strong parry.
Billy McKay was to find Radoslaw Cierzniak in excellent form and he had already seen a shot saved by the time John Rankin was penalised for a challenge on Doran and the referee pointed to the spot.
Up stepped McKay, but his well-struck effort prompted Cierzniak to produce a spectacular acrobatic save. The goalkeeper could do little in the 42nd minute, however, when Inverness opened the scoring through a neat finish from Foran on the turn.
United came out for the second half determined to restore parity and they did so within five minutes - Dow racing on to a knockdown and firing past Reguero with a sweet first-time effort.
The Terrors piled on the pressure with Inverness struggling to respond, but it looked as though they would leave the Caledonian Stadium with only a point before Mackay-Steven side-footed Armstrong's last-minute cross home and sent the away fans into delirium.