Newcastle stunned Leicester to inch closer to survival and deal a potentially damaging blow to the Foxes’ Champions League hopes.
Callum Wilson struck twice in a shock 4-2 win at the ragged hosts to all but secure the Magpies’ Premier League status.
Caglar Soyuncu’s error gifted Joe Willock an opener before Paul Dummett’s first goal in over five years doubled the visitors’ lead.
Wilson’s second-half brace lifted the Magpies to 13th, despite Marc Albrighton and Kelechi Iheanacho scoring late on for Leicester.
They will be safe if Fulham fail to beat Burnley on Monday but can now only go down on goal difference as they face the Cottagers on the final day of the season.
Leicester struggled badly after losing Jonny Evans in the warm-up and remain third but opened the door for Chelsea and West Ham in the race to finish in the top four.
The Foxes go to Manchester United on Tuesday while they also face Chelsea and Tottenham - after their FA Cup final against the Blues - in their final three top-flight games.
They could suffer late Champions League heartbreak again, with the fifth-placed Hammers five points behind with a game in hand, after the Foxes also missed out on the top four on the final day of last season.
Brendan Rodgers’ side never recovered from a last-minute change when Evans limped out of the warm-up, to be replaced by Albrighton.
The hosts enjoyed the bulk of the ball for the opening 10 minutes but faded quickly once Federico Fernandez glanced Jonjo Shelvey’s free-kick wide after 12 minutes.
Newcastle sensed the Foxes were there for the taking and only Kasper Schmeichel prevented them from opening the scoring 16 minutes in.
Jacob Murphy set Wilson clear and he squared to Allan Saint-Maximin - only for Schmeichel’s brilliant save to turn the forward’s seven-yard effort wide.
It was a warning but the Foxes failed to learn their lesson and Newcastle grabbed the lead after 22 minutes.
Soyuncu should have dealt with a simple ball upfield from Dummett but allowed it to slip through his legs and Willock nipped in to race through and confidently beat Schmeichel for his fourth goal in four games.
Two minutes later, though, Martin Dubravka maintained the Magpies’ lead when he brilliantly kept out Wesley Fofana’s bullet header.
Yet Newcastle were on top and they deservedly added a second nine minutes before the break.
Dummett had not scored since January 2016 but he rose above Fofana to head in Matt Ritchie’s corner from six yards.
Dubravka’s smart save denied Iheanacho as sluggish Leicester tried to respond and the goalkeeper saved Jamie Vardy’s attempted lob in first-half injury time.
The hosts’ urgency continued after the break and, when James Maddison’s free-kick deflected behind, Wilfred Ndidi headed wide.
But Wilson wrapped the game up with two goals to embarrass their hosts.
The Magpies hit Leicester on the break after 64 minutes when Ritchie won the ball off Ricardo Pereira and looked long for Wilson.
Timothy Castagne failed to cut the ball out and the striker went clean through to beat Schmeichel.
Wilson then put the Magpies in dreamland nine minutes later when he tapped in after his initial effort hit the post following neat work by Miguel Almiron to make it 4-0.
Leicester at least scored twice in the final 10 minutes through Albrighton and Iheanacho and, while Dubravka superbly stopped Ayoze Perez adding a third, it was too late for any comeback.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies