Matt Ritchie fired Newcastle to a first Premier League victory over Manchester City in 23 attempts as the champions’ hopes of retaining their title suffered a major blow.

Ritchie’s 80th-minute penalty completed a remarkable turn-around as the Magpies, who had fallen behind to Sergio Aguero’s strike just 25 seconds into the game, produced the most unlikely of fightbacks.

The 2-1 defeat wrecked City boss Guardiola’s hopes of marking his 100 Premier League game with a record 74th victory and left Liverpool four points clear at the top of the table ahead of Wednesday night’s home clash with Leicester.

Salomon Rondon had cancelled out Aguero’s strike with a 66th-minute equaliser, but on a night when some of the edge had been taken off a mutinous atmosphere by the news that Miguel Almiron was on his way to Tyneside to complete a move from Atlanta United, Rafael Benitez’s men produced a performance of real character.

That outcome looked unlikely when David Silva slipped as he attempted to reach Raheem Sterling’s cross and collided with keeper Martin Dubravka, who was still on the ground as Aguero hooked home the lose ball.

The Magpies might have been level with 13 minutes gone when Ayoze Perez robbed full-back Danilo and raced in on goal, only to drag his well-struck shot across keeper Ederson a yard wide.

Newcastle United v Manchester City – Premier League – St James’ Park
Manchester City players celebrate Sergio Aguero’s goal in the first minute (Richard Sellers/PA)

Newcastle were camped deep inside their own half, but threatened once against after Perez broke down the right with 22 minutes gone and crossed for Rondon to lay the ball off to Christian Atsu, whose first-time strike was deflected over by John Stones.

The home side were enjoying their best spell of the game with Perez, Ritchie and Rondon making their presence felt, but they were almost caught again 14 minutes before the break when Kevin De Bruyne span away from Florian Lejeune and picked out Aguero’s run, but this time the striker’s shot was easily saved by Dubravka.

It took a goal-line clearance by Fabian Schar to deny Leroy Sane a second goal after De Bruyne, Fernandinho, Silva and Danilo had combined dangerously on the stroke of half-time, but the Magpies made it to the dressing room without further damage.

Newcastle United v Manchester City – Premier League – St James’ Park
Newcastle United fans held up banners in protest against owner Mike Ashley during the match (Richard Sellers/PA)

The visitors resumed where they had left off with Sane drilling a 49th-minute cross just ahead of Sterling’s run, but Newcastle were working hard in an effort to stem the tide and build a bridgehead for themselves.

Dubravka had to pull off a fine reaction save to deny Silva after De Bruyne had picked him out with a sublime 58th-minute pass, and the Belgium international made way for Bernardo Silva with 25 minutes remaining having earlier survived appeals for a second yellow card following a challenge on Ritchie.

De Bruyne had barely reached the bench by the time the Magpies dragged themselves back into the game, Rondon reacting most effectively after Isaac Hayden had helped the ball into the penalty area to volley past Ederson.

And it got worse for the visitors with 10 minutes remaining when Fernandinho toppled Sean Longstaff inside the penalty area and Ritchie stepped up to smash the resulting penalty past Ederson.