Record-equalling Liverpool moved to within four wins of a first title in 30 years but they were made to prove their credentials in a 3-2 win over struggling West Ham.
A 21st successive league victory at Anfield matched the Reds’ own top-flight record, set in 1972, while an 18th consecutive win drew them level with Manchester City’s Premier League landmark set in 2017.
Jurgen Klopp’s side – leading through Georginio Wijnaldum’s early header – found themselves 2-1 down after Issa Diop and Pablo Fornals threatened to pull off the shock of the season for the league’s 18th-placed team by ending the Reds’ 417-day unbeaten league run.
However, an embarrassing goalkeeping howler in front of the Kop from Lukasz Fabianski allowed Mohamed Salah to become the club’s joint-fourth highest Premier League goalscorer alongside Luis Suarez with 69.
Sadio Mane then ensured David Moyes endured another game without a win at Anfield, leaving the Hammers mired in a relegation battle after just two points from their last seven matches.
Liverpool midfielder Naby Keita was given the nod to replace injured captain Jordan Henderson for the game.
The Guinea international was the only change from the midweek Champions League defeat away to Atletico Madrid.
James Milner, a late substitute for Henderson on that occasion, was also sidelined by what the club called “a slight muscle strain”, with Adam Lallana and Dejan Lovren the new inclusions on the bench.
West Ham made two changes with the injured Ryan Fredericks and Arthur Masuaku absent as Jeremy Ngakia – who made his only other senior appearance in last month’s 2-0 home defeat to Liverpool – and Felipe Anderson came in.
Jurgen Klopp had on Saturday warned against “this perception that it will be 1-0 after seven minutes, 2-0 after 24 minutes and it will be easy” – but his side led after nine minutes when Trent Alexander-Arnold chased a lost cause and crossed for Georginio Wijnaldum, whose header was misjudged by keeper Lukasz Fabianski.
True to Klopp’s warning, though, the lead lasted only three minutes as Issa Diop headed in Robert Snodgrass’ corner – with Fabianski’s opposite number Alisson Becker also culpable for only the second goal he had conceded in 12 games.
Alexander-Arnold’s cross-shot just eluded Mohamed Salah, who was offside in any case, as it remained all square after half an hour.
Virgil Van Dijk headed Alexander-Arnold’s corner against the top of the crossbar but there was no further score before half-time as the Reds’ winning run remained under threat.
West Ham lost midfielder Tomas Soucek to injury moments into the second half.
But it soon proved a blessing in disguise as his replacement Pablo Fornals swept home Declan Rice’s low cross to give the visitors an improbable lead.
With 10 minutes to go, Mane scored the goal to potentially equal the Premier League’s record winning run.
Joe Gomez’s long-range shot deflected into the path of Alexander-Arnold, whose stab across goal eluded Roberto Firmino but was rammed home by Mane from close range.
West Ham almost immediately sent on January signing Jarrod Bowen as they chased an equaliser.
Mane had another goal disallowed for offside after an efficient VAR check, while Alisson denied Bowen one-on-one as Klopp’s men held on for a dramatic 18th league win in succession and moved within four wins at most of the title.