West Ham led 2-1 at Anfield but an outing to overlook for goalkeeper Lukasz Fabianski allowed Liverpool to escape to success.
Liverpool were created to work to clinch a record-equalling 18th-straight Premier League win on Monday, needing a second-half rally to see off struggling West Ham 3-2 in Anfield.
Sadio Mane scored in the 81st minute to secure three more points on the march to a first title in 30 years, though they had been forced to work hard against enemies fighting at the wrong end of the table.
Jurgen Klopp’s runaway leaders took an early lead but profited from a nightmare excursion for Lukasz Fabianski to match Manchester City’s series of victories in the contest.
It seemed a place to be business as usual for the Reds when they promised that a ninth-minute lead on Merseyside, Georginio Wijnaldum nods them ahead.
The Dutchman stooped to convert Trent Alexander-Arnold’s inviting cross, Fabianski only able to paw the ball to his web.
Home fans reacted to the target by chanting, ‘We are going to win the league’ — only to be immediately silenced by an equaliser in the Kop end.
Issa Diop met Robert Snodgrass’ corner at the near post and his header squeezed beyond Alisson, meaning Liverpool’s edge had lasted for a mere 174 seconds.
Substitute Pablo Fornals — to get the injured Tomas Soucek — then put West Ham ahead in the 54th minute, offering a well-placed, first-time end when picked out by Declan Rice’s cross.
Nevertheless with David Moyes perhaps contemplating a first Anfield win in his managerial career in the 16th effort, Fabianski’s struggles continued.
Having only produced a spectacular save to tip a drive away from Alexander-Arnold, the generally reliable goalkeeper permitted a drive from Mohamed Salah to spill between his legs and cross the line.
The comeback was complete for Liverpool when Fabianski’s ill-advised choice to come out and meet Alexander-Arnold allowed the full-back to clip a bouncing ball back inside for Mane to turn home.
Mane had a second goal ruled out by VAR for offside, but Liverpool were able to celebrate a 21st sequential home victory, an English top-flight record they share with the legendary Bill Shankly’s side from 1972.