Match ends, Liverpool 4, Manchester City 3.
Manchester City lost a Premier League game for the first time this season as Liverpool edged a thrilling encounter with the league leaders at Anfield.
The Reds scored three times in a rousing eight-minute spell in the second half to go 4-1 up, then clung on after City scored twice in the last six minutes.
Jurgen Klopp's side - playing their first game since Philippe Coutinho's £142m move to Barcelona - deserved their victory as they ended City's hopes of going through the league season without losing, and extended their own unbeaten run to 18 games.
Alex-Oxlade Chamberlain's low drive gave Liverpool an early lead, but City were level before half-time through Leroy Sane, who beat Loris Karius at his near post following Joe Gomez's mistake.
The game turned decisively in two minutes either side of the hour mark, when poor defending by John Stones let in Roberto Firmino, and Sadio Mane - who had just hit the post - struck a stunning finish high past Ederson.
Ederson's poor clearance gifted Mohamed Salah a fourth, and despite their late wobble, Liverpool closed out the win to go third in the table.
While the Reds' top-four challenge goes from strength to strength, City can still reflect on a 15-point lead over Manchester United, who host Stoke on Monday.
- Analysis: Energy, belief and fantastic finishing - how Liverpool beat Man City
- Liverpool made statement with victory - Klopp
- Listen to 5 live's Football Daily podcast
- Relive the action from Anfield here
Liverpool's perfect post-Coutinho response
Liverpool fans may have wondered how Klopp and his side would respond after the sale of Coutinho. The first reaction was a thrilling one.
Coutinho has been central to Liverpool's potent attacking style both as a scorer and creator of goals, but Klopp's other game-changers stepped forward to suggest, on initial viewing at least, they can compensate for his departure.
Oxlade-Chamberlain now has a greater opportunity to make his mark, and he delivered after only nine minutes when he arrowed a low, unerring finish past Ederson's outstretched right hand in front of the Kop.
Firmino harassed Stones into a decisive error before calmly restoring Liverpool's lead at 2-1, while Mane's explosive rising drive and Salah's composure following Ederson's poor clearance illustrated the weaponry at Klopp's disposal.
This was all backed up by relentless pressing and harassing in midfield from players such as Emre Can, while Andrew Robertson subdued Raheem Sterling as he produced his best performance since his £8m summer move from Hull City.
Apart from Loris Karius' poor attempt to save from Sane at his near post, compounding Joe Gomez's mistake, this was an outstanding Liverpool performance until their late wobble.
As a taste of life post-Coutinho, it was highly satisfying for Klopp and Liverpool.
No panic for Guardiola and City
No invincibles; the unbeaten record over after 22 games. It all added up to the worst 90 minutes of the season for Guardiola and City.
Liverpool deserved their victory as City once again tasted defeat on a ground at which they have not won in 18 games stretching back to May 2003.
When the dust settles, however, City can look back at a truly magnificent campaign so far - and, more significantly, a lead that still looks unassailable.
City responded serenely to going behind early on, calmly playing their way back into contention until Sane put them back on level terms.
But Stones' weak defending broke them and there was no comeback from those goals from Firmino and Mane either side of the hour mark.
It was a day when individual errors, such as those by Stones and Ederson, were punished and City simply could not summon up another of those late shows that have brought them so many points this season.
Even then, when not at their best, they gave Anfield a collective attack of nerves in those closing moments when the possibility of an escape suddenly presented itself.
It was a demonstration of the character in Guardiola's side that they kept going - but, in the end, they finally had to taste defeat.
Miserable Anfield return for Sterling
Sterling has been regarded as the villain in these parts ever since he left Liverpool for City in a £49m deal in July 2015.
The ill-feeling towards the forward, who has been one of the Premier League's standout players this season, was demonstrated by the raucous jeers that followed every intervention in this game.
There was no lack of effort from Sterling but little went right as he lost his battle with Liverpool left-back Robertson, who was outstanding.
A historic game - what the managers said
Liverpool manager Jurgen Klopp to BBC Sport: "You can watch it as a manager or as a football fan and I prefer to do that - wow! What a game. Two teams, full throttle.
"This was a historic game you will talk about in 20 years because it looks like City will not lose another one this year.
"People watched this game all over the world and this is why - take your heart, throw it on the pitch and play like this, both teams.
"I was not scared at the end, not that I didn't think we could concede a fourth, I have known my boys long enough now, it was so intense.
"If you combine quality with attitude you see a game like this. I really loved it.
"You will find someone who wants to talk about defending, no clean sheet, but he can blow up my boots."
Manchester City boss Pep Guardiola to Sky Sports: "Congratulations to Liverpool for the victory. The game was in our hands at 1-1 but our finishing was not good and then it went suddenly to 4-1. You have to be stable when you concede a goal and we were not solid enough. You have to live this kind of situation in the season.
"The reality is we lose the game, we have a week to recover and prepare for the Newcastle game. All credit to the opponent, we know how difficult it is against a Jurgen Klopp team, so aggressive, at Anfield too. We did a good performance apart from a few minutes.
"After the second goal they scored two in a few minutes and it is hard to recover from that. In every press conference for the last few months you have said that the Premier League is done and I always said no. It is still to be done. We will defend our position game by game."
Man of the match - Alex Oxlade-Chamberlain (Liverpool)
Klopp extends record over Guardiola - the stats that matter
- Guardiola has lost five matches against Klopp, more than against any other manager.
- City's run of 22 matches unbeaten from the start of the season can be bettered by only two teams in Premier League history - Arsenal in 2003-04 (38 games) and Manchester United in 2010-11 (24).
- City have conceded four goals in their past two away Premier League away matches in January, both of which have been on Merseyside (4-0 v Everton, 4-1 v Liverpool).
- Liverpool have scored 85 goals in all competitions this season, just seven shy of the tally they managed in the whole of last season (92).
- Sane has had a hand in 16 Premier League goals this season (seven goals and nine assists), exactly double the number he was involved in last season.
- Firmino has now had a hand in six goals in six Premier League games against Manchester City (three goals, three assists), scoring and assisting in three of those games.
- Salah has scored 24 goals and assisted another seven in 30 appearances for Liverpool in all competitions this season.
- This was City's first 4-3 defeat in the Premier League since they lost to Manchester United by that scoreline in September 2009.
The visit of Newcastle to Etihad Stadium on Saturday, 20 January (17:30 GMT) is next up for City, while Liverpool have to wait two more days to make the trip to Swansea (20:00 GMT).
- 23CanSubstituted forMilnerat 79'minutesBooked at 90mins
- 11SalahSubstituted forLallanaat 88'minutes
- 9FirminoBooked at 60mins
- 19ManéSubstituted forKlavanat 90+4'minutes
- 30OtamendiBooked at 65mins
- 18DelphSubstituted forDaniloat 31'minutes
- 17De Bruyne
- 25FernandinhoBooked at 72mins
- 7SterlingBooked at 69minsSubstituted forBernardo Silvaat 71'minutes
- 20Bernardo Silva
- Andre Marriner
- Shots on Target
Second Half ends, Liverpool 4, Manchester City 3.
Offside, Manchester City. Kevin De Bruyne tries a through ball, but Sergio Agüero is caught offside.
Substitution, Liverpool. Ragnar Klavan replaces Sadio Mané.
James Milner (Liverpool) is shown the yellow card for a bad foul.
Sergio Agüero (Manchester City) wins a free kick on the right wing.
Foul by James Milner (Liverpool).
Attempt missed. Sergio Agüero (Manchester City) right footed shot from outside the box misses to the right. Assisted by Nicolás Otamendi.
Nicolás Otamendi (Manchester City) wins a free kick in the defensive half.
Foul by Adam Lallana (Liverpool).
Goal! Liverpool 4, Manchester City 3. Ilkay Gündogan (Manchester City) right footed shot from the centre of the box to the bottom right corner. Assisted by Sergio Agüero with a cross.
Substitution, Liverpool. Adam Lallana replaces Mohamed Salah.
Offside, Manchester City. Bernardo Silva tries a through ball, but Kevin De Bruyne is caught offside.
Corner, Manchester City. Conceded by Andrew Robertson.
Hand ball by Fernandinho (Manchester City).
Offside, Liverpool. Loris Karius tries a through ball, but Mohamed Salah is caught offside.
Goal! Liverpool 4, Manchester City 2. Bernardo Silva (Manchester City) left footed shot from the centre of the box to the bottom right corner.
Attempt blocked. Ilkay Gündogan (Manchester City) right footed shot from the centre of the box is blocked. Assisted by Sergio Agüero.
Attempt missed. Georginio Wijnaldum (Liverpool) right footed shot from outside the box is close, but misses to the left. Assisted by Roberto Firmino.
Attempt blocked. Ilkay Gündogan (Manchester City) right footed shot from outside the box is blocked. Assisted by Bernardo Silva.