Mohamed Salah scored twice as Liverpool eventually broke down resilient Newcastle United to open up a three-point lead at the top of the Premier League.
In a relentless and frantic game, fuelled by wicked rain and wind on Merseyside, Liverpool took swing after swing at Newcastle in the first half but were in danger of being held to a third consecutive Anfield draw.
But Salah, who will now depart to join Egypt at the Africa Cup of Nations and who had a first-half penalty saved, tapped home a cross for his side's first then converted a second spot-kick in the closing stages.
His first strike was his 150th Premier League goal for the Reds, but it was cancelled out five minutes by Alexander Isak, who got in behind the hosts' defence and curled home.
Liverpool pressed to go in front again and eventually Curtis Jones gave them the lead again before a scuffed Cody Gapko effort from a brilliant Salah pass gave them breathing space.
But back came Newcastle when Sven Botman headed home a corner to make it 3-2 before Salah sent Martin Dubravka - who was heroic throughout - the wrong way to secure the points.
Liverpool had won their opening seven Premier League games at Anfield this season but had been been held to draws by Manchester United and Arsenal in their previous two home games.
They now lead Aston Villa by three points and have a five-point lead over Manchester City, who have a game in hand, and Arsenal.
Newcastle, who were missing nine first-team players, remain ninth.
Follow live text updates as Liverpool host Newcastle in the Premier LeagueHow did you rate Liverpool's performance? Have your say hereWhat did you make of Newcastle's display? Send us your views hereSlick Liverpool find a way in chaotic match
From the first whistle the match was dominated by Liverpool, who registered a league-high 18 shots in the first half.
Trent Alexander-Arnold saw an effort deflected wide and hit the post with a wicked volley from an incredibly tight angle, while Darwin Nunez's flicked effort was kept out by Dubravka.
Diaz had a goal disallowed after Nunez had strayed marginally offside in the build-up, before Salah's first penalty - powered to Dubravka's left but too central - was saved.
It meant Salah had failed to score four of his past 10 penalties in all competitions but he put it behind him and was brilliant in the second half.
He and Nunez interchanged passes to leave the Egypt forward unmarked in the middle to tap home for the opener.
The equaliser was a setback - especially after Nunez was twice denied with chances to make it 2-0 - but Liverpool's quality and intricate forward play eventually found a way through Newcastle.
Jones tapped home after a brilliant through pass by Salah found Diogo Jota, before the former Roma forward crossed for Gakpo, who dribbled his effort over the line with the bottom of his studs.
Salah's second came when Jota was tripped by Dubravka, and he showed his calmness to send the goalkeeper the wrong way and sign off for what could be potentially six weeks with his country.
The victory means Liverpool are unbeaten in 22 games at Anfield, and have now only lost one of their past 52 home games in the Premier League.
More to follow.
How to play
Rate players out of 10 throughout or after the game. The rater will close 30 minutes after the final whistle.
Rating range key1 = Give it up10 = Pure perfection
Liverpool
Squad number1Player nameAlisson
Squad number66Player nameAlexander-Arnold
Squad number5Player nameKonaté
Squad number4Player namevan Dijk
Squad number2Player nameGomez
Squad number8Player nameSzoboszlai
Squad number3Player nameEndo
Squad number17Player nameJones
Squad number11Player nameMohamed Salah
Squad number9Player nameNúñez
Squad number7Player nameDíaz
Squad number10Player nameMac Allister
Squad number18Player nameGakpo
Squad number20Player nameDiogo Jota
Squad number38Player nameGravenberch
Newcastle United
Squad number1Player nameDúbravka
Squad number21Player nameLivramento
Squad number5Player nameSchär
Squad number4Player nameBotman
Squad number33Player nameBurn
Squad number67Player nameMiley
Squad number39Player nameBruno Guimarães
Squad number36Player nameS Longstaff
Squad number10Player nameGordon
Squad number14Player nameIsak
Squad number7Player nameJoelinton
Squad number6Player nameLascelles
Squad number20Player nameHall
Squad number24Player nameAlmirón
Line-ups
Liverpool
Formation 4-3-3
1Alisson66Alexander-ArnoldBooked at 45mins5Konaté4van Dijk2Gomez8SzoboszlaiSubstituted forGravenberchat 64'minutes3EndoBooked at 65minsSubstituted forMac Allisterat 75'minutes17Jones11Salah9NúñezSubstituted forGakpoat 64'minutes7DíazBooked at 45minsSubstituted forJotaat 64'minutesSubstitutes
10Mac Allister18Gakpo19Elliott20Jota38Gravenberch53McConnell62Kelleher78Quansah84BradleyNewcastle
Formation 4-3-3
1DúbravkaBooked at 84mins21Livramento5Schär4Botman33BurnSubstituted forHallat 82'minutes67MileyBooked at 45minsSubstituted forAlmirónat 54'minutes39Bruno GuimarãesBooked at 28mins36S LongstaffBooked at 89mins10Gordon14Isak7JoelintonBooked at 66minsSubstituted forLascellesat 82'minutesSubstitutes
3Dummett6Lascelles11Ritchie17Krafth18Karius20Hall24Almirón29Gillespie54MurphyLive Text
Match ends, Liverpool 4, Newcastle United 2.
Second Half ends, Liverpool 4, Newcastle United 2.
Foul by Mohamed Salah (Liverpool).
Bruno Guimarães (Newcastle United) wins a free kick in the defensive half.
Foul by Alexis Mac Allister (Liverpool).
Miguel Almirón (Newcastle United) wins a free kick in the attacking half.
Corner, Liverpool. Conceded by Jamaal Lascelles.
Attempt blocked. Diogo Jota (Liverpool) right footed shot from the centre of the box is blocked.
Attempt blocked. Mohamed Salah (Liverpool) left footed shot from the centre of the box is blocked. Assisted by Ryan Gravenberch.
Ibrahima Konaté (Liverpool) wins a free kick in the attacking half.
Foul by Fabian Schär (Newcastle United).
Sean Longstaff (Newcastle United) is shown the yellow card for a bad foul.
Diogo Jota (Liverpool) wins a free kick in the defensive half.
Foul by Sean Longstaff (Newcastle United).
Attempt blocked. Mohamed Salah (Liverpool) left footed shot from the right side of the box is blocked. Assisted by Curtis Jones.
Goal! Liverpool 4, Newcastle United 2. Mohamed Salah (Liverpool) converts the penalty with a left footed shot to the bottom left corner.
Martin Dúbravka (Newcastle United) is shown the yellow card for a bad foul.
Penalty Liverpool. Diogo Jota draws a foul in the penalty area.
Penalty conceded by Martin Dúbravka (Newcastle United) after a foul in the penalty area.
Substitution, Newcastle United. Lewis Hall replaces Dan Burn.