Liverpool scored in the 87th and 88th minutes to produce a sensational late turnaround to beat Fulham in a seven-goal thriller.
The Reds had fallen 3-2 behind in the 80th minute to Bobby De Cordova-Reid's header, but Wataru Endo and Trent Alexander-Arnold struck to move Liverpool two points behind leaders Arsenal.
How the match unfolded
Liverpool dominated the early exchanges and went in front in the 20th minute through an own goal from Bernd Leno.
Dominik Szoboszlai drew a foul from Joao Palhinha and Alexander-Arnold, 25 yards out from goal, produced a superb free-kick into the top-right corner that hit the crossbar before striking the back of Leno and going in.
However, Fulham drew level four minutes later through former Liverpool player Harry Wilson.
The Welshman received a pass from Antonee Robinson on the left wing and prodded the ball past Caoimhin Kelleher, who started in place of the injured Alisson.
With the contest finely balanced in the 38th minute, Alexis Mac Allister produced an incredible strike to restore Liverpool’s lead and net his first Premier League goal for the club.
The ball broke to the Argentinian and from nearly 30 yards out, he smashed a half-volley into the top-right corner.
But Fulham levelled in the third minute of first-half added time through Kenny Tete. Liverpool were unable to clear a corner and after Raul Jimenez had flicked the ball on, Tete scrambled the ball in from close range. The goal was initially ruled out for offside, but was overturned following a VAR review.
The visitors were unfortunate not to have taken the lead when Tim Ream scored from another set-piece. Palhinha’s initial header was saved by Kelleher and Ream converted the rebound, only for the goal to be ruled out for offside.
Liverpool then went inches away from taking the lead for a third time in the match. On the counter-attack, Mohamed Salah fed the ball into Darwin Nunez, whose shot crashed against the crossbar and clear.
That is now the fifth occasion that Nunez has hit the woodwork this season, three more times than any other player.
Nunez then had another chance to score, but the Uruguayan scuffed his shot wide of the right post.
Fulham took the lead for the first time in the 80th minute through substitute De Cordova-Reid, who rose above Konstantinos Tsimikas to bury a header past Kelleher.
Liverpool missed a gilt-edged chance to level, with Salah blazing over the crossbar after Leno produced a fine save from Luis Diaz's effort, but they were not to be denied as two quickfire goals put the hosts in front.
First, Wataru Endo produced fine curling strike from the edge of the box into the top-right corner to equalise with his first Premier League goal.
Then 79 seconds later, Alexander-Arnold thumped the hosts in front from Tsimikas's knockdown.
It was a case for deja vu for Fulham, as the last time they scored three goals at Anfield, they also lost 4-3.
It was also the latest Liverpool have ever fallen behind in a Premier League match that they went on to win.
Liverpool’s incredible comeback moves them on to 31 points. Fulham stay in 14th, with 15 points.
WHO'S GOING TO BE YOUR
MAN OF THE MATCH?
Vote at Full-time