Crystal Palace goalkeeper Julian Speroni's error gifted Liverpool the win to keep them on track in the title race after the Premier League leaders had almost squandered their advantage in a 4-3 victory at Anfield.

Crystal Palace goalkeeper Julian Speroni's error gifted Liverpool the win to keep them on track in the title race after the Premier League leaders had almost squandered their advantage in a 4-3 victory at Anfield.

The Argentinian, who turns 40 in May, was making his first appearance since December 2017 because of injuries to Wayne Hennessey and Vicente Guaita.

After an unexpectedly quiet first half the heat was turned up on Speroni and the pressure eventually told with the score at 2-2 when he palmed James Milner's bouncing cross up in the air virtually into his own net before Mohamed Salah made it 3-2 on the goalline.

It was the Egypt international's 50th Premier League strike in 72 matches - only Andrew Cole, Ruud Van Nistelrooy and Alan Shearer achieved the landmark in fewer appearances - having previously scored the goal to get Jurgen Klopp's side back on track at the start of the second half.

Andros Townsend had given the visitors a surprise lead but after Salah cancelled that out Roberto Firmino converted the Reds' 1,000th Premier League goal at Anfield.

James Tomkins' header made it level but Speroni's blunder handed the initiative to the hosts.

However there was a manic finish with Sadio Mane and Eagles substitute Max Mayer both scoring in added time after James Milner had been sent off for a second bookable offence on Wilfried Zaha.

It had all started so comfortably for Speroni, who easily passed his first test - although he could not have asked for a more gentle introduction than a shot from centre-back Joel Matip.

He claimed a couple of easy catches, plus there were a couple of off-target headers from Virgil Van Dijk and Joel Matip, but he was hardly troubled.

If Klopp was annoyed about their lack of penetration in the area, mainly due to Palace's ultra-defensive set-up, he was furious about referee Jon Moss' decision not to give his side a penalty in the 33rd minute.

Townsend, under pressure from Mane, handled the ball with his arm well above his head but the official pointed the other way.

Less than two minutes later Palace were ahead when a well-worked move out of defence, with play quickly switched out to Zaha out on the left saw Townsend sneak in ahead of Fabinho to convert a low cross.

The sense of grievance and frustration was eased 60 seconds into the second half and totally alleviated by the 53rd minute.

Liverpool's equaliser had both an element of fortune and a touch of class as Van Dijk's speculative 30-yard shot was heading wide before it ballooned up off James McArthur, dropping to Salah six yards out who volleyed home with the outside of his left foot.

Firmino put them ahead when Robertson and Naby Keita, somewhat surprisingly preferred to Xherdan Shaqiri, combined down the left and Firmino was allowed to turn in the area to fire a shot past Speroni, the ball squeezing under body of James Tomkins on its way through.

Tomkins, who could have conceded a penalty for handball in a tackle with Keita, powered home a 65th-minute header as Palace becoming only the second side to breach the Reds' defence more than once in a league game this season.

In a chaotic end Milner was dismissed, Mane made it 4-2 only for Meyer to set up a fraught finish.

Klopp's quadruple fist-pump in front of the Kop at the end showed just how tense - and how vital a result - it was for Liverpool.