Sadio Mane's first-half goal was enough to give Liverpool victory over West Ham at Anfield and move them back within three points of Premier League leaders Manchester City.
Jurgen Klopp's men deserved the win but it did not come without the odd scare as Pablo Fornals and Manuel Lanzini both wasted excellent chances to equalise.
The Hammers' frustrations were compounded by the loss of in-form Jarrod Bowen to what looked like a significant injury, the forward helped off the pitch and down the tunnel following a collision with former Hull team-mate Andy Robertson.
Five days before the Europa League last-16 first-leg trip to Sevilla, it was not what manager David Moyes needed.
Liverpool had chances to extend their lead, with new signing Luis Diaz particularly impressive.
However, with the title race as it is, victory was all that mattered. And now Liverpool fans are in the unusual position of hoping for a United victory in Sunday's Manchester derby at Etihad Stadium.
"We could have done better. We did pretty well first half, but in the second half if you are not better, you need quick legs, big heart and passion and that's what we needed to get the result," Klopp told BBC Match of the Day.
"In the end it was open, we needed a bit of luck, but you cannot win as many games in a row as we have without a bit of luck."
Reaction to Liverpool v West Ham and the rest of Saturday's Premier League games
Life might have been far less stressful for Liverpool's fans had Mohamed Salah taken the first-minute chance that came his way, instead of firing straight at goalkeeper Lukasz Fabianski.
At times, Liverpool's attack is so fast and fluid it is impossible for opposition defences to cope. And in Diaz, their £37.5m January arrival from Porto, they have a player that fits that template perfectly.
The Colombian produced a wonderous piece of skill to create an early chance for himself which he drove into Craig Dawson's face.
Diaz then came close twice in the second half too, with the first of those particularly impressive in the way he manipulated Mane's pass into a scoring chance that went narrowly wide. When he was replaced in the final minute of injury time, his standing ovation was fully deserved.
"He is a top player - a most easy player to coach because all the things he is doing are pretty natural to him," added Klopp. "There is not a lot of coaching necessary. Of course he needs to work on one or two things we do defensively, but he is very football smart, has a big heart and wants to fight extremely hard for the team."
In the end, though, Trent Alexander-Arnold's precise low cross created the one moment that mattered.
The England man's 16th assist of a stellar season was one of his best, leaving Mane to turn home his fourth goal in five games from close range.
West Ham have lost 70 league matches against Liverpool, have now won once at Anfield in 52 attempts, and Moyes is without a win in 66 away league games against Liverpool, Chelsea, Arsenal and Manchester United, so perhaps the outcome of the match was not a surprise.
But the Scot will nevertheless wonder how his side failed to capitalise on some excellent chances.
Arguably Fornals had the best when he was put through by Bowen just before the break, but instead of trying to beat Alisson in a conventional manner, he lofted a chip over the Brazilian that lacked pace and Alexander-Arnold was able to get back and clear.
Lanzini then undid all his good work in creating space on the edge of the area by blazing over with only Alisson to beat, while in the final stages Michail Antonio was bearing down on goal only for Naby Keita to get back to deny him.
"The players played really well today, I don't think a draw would have been off the mark but we didn't get it," Moyes told Match of the Day.
"We needed one to go in. We had to ride our luck at the start but we grew into the game and had three big chances, plus one or two other opportunities on top of that."
Those frustrations were only compounded by the loss of Bowen, who was heavily tipped to make Gareth Southgate's England squad for the friendlies against Switzerland and Ivory Coast.
Moyes, clearly, will be more concerned about that trip to Sevilla and in addition to sweating on Bowen's fitness, must hope skipper Declan Rice has recovered from the illness that kept him out of this game in time to be available.
"I think Jarrod will have a scan on his heel area. He has been playing really well for us so it would be a blow if we go into the Sevilla game without him," added the Scot.
"Declan had illness that came on on Thursday and through Friday. We are hoping it will not be too bad but I can't tell at the minute."
Source: BBC
BDST: 1702 HRS, MAR 06, 2022
SMS