Papiss Cisse dragged Newcastle nine points clear of the Barclays Premier League relegation zone with a dramatic injury-time winner to see off Stoke 2-1.
The Senegal international struck two minutes into stoppage time to complete a comeback after the Potters had threatened to snatch victory at St James' Park.
Jonathan Walters had given the visitors the lead against the run of play from the penalty spot with 67 minutes gone, but Yohan Cabaye's superb free-kick six minutes later set the stage for Cisse's last-gasp winner.
The win was just what manager Alan Pardew had asked for to end a good week and while it was deserved on the balance of play in front of a crowd of 50,703, it looked like evading his side until the death.
Within minutes of the final whistle in Thursday night's 0-0 Champions League draw with Anzhi Makhachkala in Moscow, Pardew immediately turned his attention to Stoke and the business of securing three points.
He knew his players would face a different challenge at St James' Park to the one with which they had dealt on the artificial pitch at the Luzhniki Stadium, and just how different was confirmed when the Potters' team-sheet arrived.
Opposite number Tony Pulis, to the surprise of no-one, had packed his starting XI with players noted as much for their brawn as for what they could do with the ball, to the extent that he named five men who were nominally defenders and three who would claim to be strikers among his 10 outfield players.
There was little subterfuge over the way he wanted his team to play and they duly obliged as the hoisted a series of long balls into the Newcastle penalty area and asked Peter Crouch, Walters and Cameron Jerome, reinforced by Ryan Shawcross, Geoff Cameron and Ryan Shotton, for set-pieces, to compete for them.
However, with Steven Taylor and Mapou Yanga-Mbiwa up for the fight and keeper Rob Elliot accepting the responsibility to deal with his share of the aerial assault, the Magpies were largely untroubled during the opening 45 minutes.
Elliot had to field a third-minute volley by Crouch, after he had been allowed to control Shawcross' long ball on his chest 25 yards out, and then pluck Shotton's tame effort from underneath his crossbar nine minutes later.
But as the visitors' early assault abated, Pardew's men started to force their way into the game.
Initially, they failed to make the most of their possession as Cabaye floated a series of balls into the penalty area which were tailor-made for keeper Asmir Begovic and his defenders.
But as the half wore on, they adopted a more intelligent approach with Cabaye prompting, Moussa Sissoko driving at the heart of the Stoke rearguard and full-backs Mathieu Debuchy and Davide Santon getting forward well.
Cabaye sent a 16th-minute shot from distance across Begovic and just past the far post, and Jonas Gutierrez curled another effort similarly wide five minutes later.
Santon tested Begovic with a well-struck 33rd-minute drive after cutting inside Shotton, but the home side should really have been in front four minutes later.
Cabaye's through-ball took a deflection and evaded Sissoko but it fell nicely for Yoan Gouffran, only for the Frenchman to lift his shot over the bar.
Cabaye saw a 42nd-minute strike deflected just wide with the keeper wrong-footed, but the black and white shirts had to close ranks seconds later as Glenn Whelan forced his way into the penalty area on a rare foray into enemy territory but could not find a finish.
Gutierrez saw a 56th-minute drive blocked out for a corner by Whelan, but the Magpies were struggling to penetrate a stubborn Stoke defence.
Their task grew in size with 23 minutes remaining when, after Cheick Tiote had felled Walters with a rash challenge inside the box, referee Andre Marriner had little option but to point to the spot and Walters, whose recent record from 12 yards has been dreadful, duly obliged to give the visitors a lead they scarcely deserved.
However, the lead lasted barely six minutes as the game became increasingly lively both on and off the pitch.
Sissoko was tripped by Whelan literally inches outside the box and after Mr Marriner awarded a free-kick, Begovic became embroiled in a row with Steven Taylor as the Stoke coaching staff took exception to Pardew's reaction on the sideline.
But once order had been restored, Cabaye curled the resulting free-kick over the wall and in off the underside of the crossbar to level.
There was even better to come deep into injury time when substitute Sylvain Marveaux picked out Cisse in front of goal and he controlled and fired past the stranded Begovic to snatch victory.