Leicester collapsed at home to Tottenham to let Champions League qualification slip through their fingers on the final day for the second consecutive Premier League season.
The Foxes needed a favour elsewhere to have any hope of reaching the European promised land, starting the day fifth behind Chelsea and Liverpool.
The Reds beat Crystal Palace at Anfield but Chelsea fell to Aston Villa and opened the door for Leicester to sneak through.
It seemed as though the hosts would take that chance when Jamie Vardy opened the scoring from a penalty, only for Harry Kane to equalise out of nothing from a loose ball.
Leicester regained the lead through Vardy’s second penalty but a late flurry from Tottenham saw Kasper Schmeichel’s own goal and two strikes from Gareth Bale secure one final victory for Ryan Mason.
Leicester spent 242 days in the top four, but missing out on the day that mattered the most will sting, even if this has been a campaign to remember.
It has been one to forget for Spurs as they posted their lowest Premier League finish since 2008 and Kane is now expected to press ahead with his designs to move on this summer.
He would leave on a personal high, winning the Golden Boot for a third time with 22 goals and also claiming the playmaker award with 14 assists, and the way he emotionally hugged several team-mates at the end of the game suggested he thinks he has played his last game for the club.
It was an afternoon of ups and downs and, with Leicester knowing they had to win, they made the first move.
They were slicker and sharper from the off and went ahead in the 18th minute though Vardy’s penalty.
The former England striker got the wrong side of Davinson Sanchez and advanced into the box before being tripped by Toby Alderweireld.
Referee Anthony Taylor initially waved play on before being advised to check the pitchside monitor by VAR, where he changed his decision and Vardy made no mistake from the spot.
It was just his second goal in 19 games but proved timely as it sent the Foxes back into the top four in the live standings.
With news coming through of West Ham’s domination against Southampton, Spurs’ Europa League hopes diminished, but to their credit they responded well.
Son Heung-min should have levelled but he lost his balance at the vital moment after a great ball in by Dele Alli.
But Tottenham did not have to wait long to get level and there was no surprise that it was Kane who delivered.
The visitors recycled a corner and Son’s deflected cross fell to the England captain, who was clinical in thrashing home a first-time volley to move one goal in front of Liverpool’s Mohamed Salah in the race.
Leicester again knew they had to come out and win the game and were given another helping hand as Vardy won another penalty in the 52nd minute.
He tangled with Sanchez, though appeared to have the defender in an arm-lock, and went down, dispatching the resulting spot-kick into the same corner as his first.
With Arsenal also now winning, Spurs slipped out of European contention all together. They had a chance for an immediate response but a selfish Kane blazed over when Alli or Son were waiting for a pass.
It was all going to plan for Leicester until Tottenham equalised 14 minutes from time and it came in unfortunate circumstances for the hosts.
Schmeichel, who has been monumental throughout the campaign, made a mess of his attempted punch from Son’s corner under pressure from Sanchez and the ball ricocheted into his own net.
Son missed a glorious chance immediately after as Schmeichel saved with his legs, but, with Leicester needing a goal, Spurs found holes on the break and scored twice in the last few minutes.
A move that involved Son, Kane and Bale saw the Welshman fire home with a low finish in the 87th minute and then right at the death Bale poked home a rebound after his effort hit the post having charged through on goal.