Inverness were denied a Europa League place following their first Highland derby defeat of the season to Ross County.
Andre Hainault's well-executed volley two minutes before the break, coupled with St Johnstone's 2-0 win over Motherwell, saw Caley Thistle fall at the final hurdle in their quest to seal an unlikely European debut.
Inverness had not lost in five games against the Dingwall side this season but they were second best today after struggling to cope without several midfielders.
It was a cruel end to their most successful season, which also saw them lose a Scottish League Cup semi-final penalty shootout to Hearts.
Terry Butcher's side had not been out of the Scottish Premier League top three since November and had the chance to seal a European spot last weekend but blew a one-goal lead at home to Dundee United.
Their problems started before the game. With Richie Foran and Ross Draper suspended, Inverness started with a four-man midfield with an average age of 20.
Owain Tudur Jones, who has come off the bench in recent weeks as he stalls on a contract offer, was a surprise absence. The Wales international has been a key player this season and his physical presence and composure was missed as Caley Thistle started with defenders Charlie Taylor and Danny Devine in central midfield.
Another surprise was the introduction of 19-year-old Conor Pepper for his first appearance of 2013 and only his second SPL start. He only lasted 36 minutes before limping off for Nick Ross.
County had Paul Gallacher making his debut in goal after Michael Fraser was injured in training on Friday and he enjoyed an unexpectedly comfortable afternoon.
The home side had seen their European hopes ended with defeat at Motherwell last weekend but Highland pride and a desire to end their best season on a high ensured the opening stages were keenly contested.
Inverness created the first chance when Aaron Doran's corner found Devine in space at the back post but he could not get his half-volley on target.
County began to get the ball down and control play and they created their first chance on 20 minutes when Ivan Sproule got in front of a defender to meet Evangelos Oikonomou's low cross but his first-time effort just cleared the top corner.
There was an aggressive undercurrent to the game and Sproule and Graeme Shinnie were soon booked following a clash.
County kept coming forward. Mihael Kovacevic powered his way to the 18-yard box and dug out a low shot that Antonio Reguero saved before Steffen Wohlfarth volleyed wide with the Spaniard scrambling.
There were celebrations across the away end as news of a goal at McDiarmid Park came through. Unfortunately for the mistaken Inverness fans, it was St Johnstone who had opened the scoring, a realisation that began to sink in around the time Stuart Kettlewell's shot swerved just wide for the hosts.
Caley Thistle were soon hit with another major blow. Paul Lawson returned the ball after his corner ended up back at his feet and the ball eventually fell for Hainault beyond the back post.
The Canadian international watched the ball drop and unleashed a powerful volley that flew into the top corner from 10 yards.
Inverness almost lost another before the break when Josh Meekings hesitated inside the box under pressure from Sproule but Mark Fotheringham could not get hold of his shot and Reguero saved.
Doran went up front after the restart and Gallacher saved his volley in the opening seconds of the half but County were soon back on the attack and Wohlfarth threatened twice.
News of a second St Johnstone goal came through, this time accurately, sparking celebrations among the home fans.
It looked like Inverness were going to have to do it themselves and they found more urgency to their play with Billy McKay coming close when he flicked David Raven's shot just wide.
But Inverness could not keep the pressure up and Lawson twice threatened from long range.
Raven had a half chance but Gallacher got down well to hold at the second attempt and the away fans were already resigned to defeat before Iain Vigurs hit Reguero's post with an injury-time free-kick.