Dundee United manager Robbie Neilson effectively conceded the Championship title after his side crashed to defeat in a match they had to win.
They did the hard part of recovering from the concession of an early goal to find a leveller and then looked like they would prevail.
However, they were caught on the counter-attack by Partick Thistle and 17-year-old Aidan Fitzpatrick ruthlessly exploited them with a brilliant last-minute winner.
Ross County, who have played a game less, now have an eight-point lead which looks unassailable.
Neilson said: “It’s going to be very difficult now to challenge at the top after dropping those points. We are still aiming to hunt down County as much as we can though.
“It’s very disappointing. We got back in it, changed things to get on top of the game again and we got the goal and we were in control.
“But then we went gung-ho and started chasing it to get a result. It was like a basketball game at the end.”
It was the former United striker Scott McDonald who headed Thistle in front on four minutes, stealing in behind Mark Reynolds to connect with Joe Cardle’s cross.
The former Celtic striker really should have scored a second eight minutes into the second half.
United should have had a penalty in 73 minutes when Miles Storey took out Tommy Robson but Alan Newlands didn’t give it.
However, as Thistle defended deeper United found a leveller three minutes later.
Jack McMillan fouled Pavol Safranko just outside the box and Nicky Clark drilled a brilliant free kick low into the right corner. However, in a sensational finish Fitzpatrick won it for the relegation-threatened Jags.
Lewis Mansell burst down the left and picked out the teenager in the box and he brilliantly slotted past Ben Siegrist.
Thistle manager Gary Caldwell said: “It’s a brilliant three points for us.
“We scored a great goal in the first when we played well without causing them too many problems.
“We were comfortable but as the game wore on, we started to get deeper and more edgy and I have told the players that whilst we have won, we have to handle those pressure moments.
“But in terms of character and desire to win a big football match they were outstanding.
“The two strikers caused them all sorts of problems on the counter and gave us an outlet and scored a fantastic goal.
“When you need that bit of composure, Fitzy had it.
“I’m delighted with the result. It’s a huge victory for us.”