Trailing 2-1 late in the second half, West Ham keeper Lukasz Fabianski was twice at fault as Mohamed Salah and Sadio Mane ensured Liverpool prevailed to equal the record of 18 consecutive top-flight wins set by Manchester City in 2017.

Trailing 2-1 late in the second half, West Ham keeper Lukasz Fabianski was twice at fault as Mohamed Salah and Sadio Mane ensured Liverpool prevailed to equal the record of 18 consecutive top-flight wins set by Manchester City in 2017.

Trailing 2-1 late in the second half, West Ham keeper Lukasz Fabianski was twice at fault as Mohamed Salah and Sadio Mane ensured Liverpool prevailed to equal the record of 18 consecutive top-flight wins set by Manchester City in 2017.

Runaway Premier League leaders Liverpool had to come from behind -- and needed some help from two goalkeeping blunders - to beat lowly West Ham United 3-2 in a thrilling game and maintain their 100 per cent home record on Monday.

Trailing 2-1 late in the second half, West Ham keeper Lukasz Fabianski was twice at fault as Mohamed Salah and Sadio Mane ensured Liverpool prevailed to equal the record of 18 consecutive top-flight wins set by Manchester City in 2017.

ADVERTISEMENT

Juergen Klopp's men now need 12 points from 11 games to make sure of their first league title in 30 years.

"We started really well, scored a wonderful first goal. Then we weren't good in the second ball situations," said the Liverpool manager. "We struggled in these situations, that was difficult for us tonight."

"You have to squeeze it, force it and that's what we did tonight. It's so special, it's unbelievable."

It looked like business as usual for Liverpool, unbeaten in the league and now with a 22-point advantage at the top, when they scored in the ninth minute as Georginio Wijnaldum headed home Trent Alexander-Arnold's whipped cross from the right.

ADVERTISEMENT

Three minutes later, though, 18th-placed West Ham drew level with Issa Diop's angled header from a Robert Snodgrass corner beating keeper Alisson Becker, who should have kept it out.

Virgil Van Dijk headed against the bar for Liverpool but Anfield was stunned in the 54th when Hammers substitute Pablo Fornals turned a low cross from Declan Rice into the far corner.

Facing the possibility of their first defeat of the Premier League campaign, Liverpool inevitably piled on the pressure but their usually deadly frontline was misfiring.

Only an awful Fabianski error allowed Klopp's side to equalise in the 68th -- Salah's tame shot from an Andy Robertson pull back creeping through the legs of the Polish keeper.

ADVERTISEMENT

Fabianski was at fault again when he came off his line but failed to stop Alexander-Arnold looping the ball over him to Sadio Mane who slotted home with nine minutes left.

With the assist, Alexander-Arnold equalled his tally, set last season, of 12 -- a Premier League record for a defender.

Mane had the ball in the net again in the 86th minute but his effort was ruled out for offside after a swift VAR review.

West Ham, who played with much more determination and poise than in recent weeks but remain in the relegation places, fought to the end and substitute Jarrod Bowen found space on the left of the box but Alisson was out quick to smother his effort.

Defeat leaves the Hammers on 24 points from 27 games, a point behind Aston Villa in the safety zone.