Fabio Carvalho scored a dramatic winner in the eight minute of second-half added time to snatch victory for Liverpool over Newcastle at Anfield.
Newcastle's record signing Alexander Isak scored on his debut for the club to put the visitors ahead on Merseyside.
He thought he had a second after the break but his well-taken finish was ruled out for offside.
Five minutes later, Liverpool equalised through Roberto Firmino with his third goal of the season.
Advert
Liverpool pushed hard for a second goal, with Luis Diaz going close twice in the final minutes of the match.
Just as the game looked to be heading for a draw, second-half substitute Carvalho fired home the winner from a corner with virtually the last kick of the game.
Former Liverpool defender Jamie Carragher believes Newcastle were punished for "time-wasting" in added time, with only five minutes originally awarded by referee Andre Marriner.
Advert
Carragher tweeted: "That's Karma that for all the time wasting!
"Harvey Elliott outstanding & brilliant cameo again from Carvalho!!"
Carvalho's winner came just a day after his 20th birthday and secured a second consecutive victory for Liverpool, following last weekend's 9-0 win over Bournemouth.
Advert
Victory for Jurgen Klopp's side moves them up to fifth in the Premier League, two points outside the Champions League places, while Newcastle remain 11th.
After the match, Newcastle manager Eddie Howe described the dramatic defeat as "horrible".
"That's the pain of football,” he told BT Sport.
"That's the horrible side of it when your team has given everything. It is a sickener for us but it is part of the game. We just didn't deal with the corner.
Advert
"I thought we played well in the first half. Naturally when you are 1-0 up here you are not going to be the dominant team and you are going to have to withstand pressure.
"It is difficult to defend against this team."
Topics: Football, Newcastle United, Liverpool, Premier League, Fabio Carvalho