Darwin Nunez's evolution into a genuine number nine for Liverpool continued as his brilliant fourth goal of the season proved vital in securing a home victory over West Ham.
The Uruguay international scored in back-to-back games for the first time since February as Jurgen Klopp's side made it five successive Premier League wins to move into outright second spot, behind champions Manchester City, with Arsenal and Tottenham drawing at the Emirates.
Captain Virgil van Dijk had spoken of the 24-year-old turning his potential into quality after the midweek Europa League win over LASK, in which Nunez scored a penalty but could have had a couple of others.
His rasping 60th-minute volley from an exquisite Alexis Mac Allister lofted pass restored their lead after Jarrod Bowen's diving header in the first half had cancelled out Mohamed Salah's penalty, his 12 goal in his last 13 appearances at Anfield.
Substitute Diogo Jota made the points safe late on as Liverpool scored at least three goals in their opening three home league games for only the second time in the last 43 years.
But it was Nunez who caught the eye with his improving integration into a team which for so long played with a false nine in Roberto Firmino.
His hold-up play gets better and, after that helped Liverpool take the lead in Austria in midweek, he was at it again in the build-up to Salah's penalty.
He launched a rapid counter-attack on the left after holding up the ball on the halfway line before releasing Luis Diaz and then charging 60 yards into the area in an attempt to get on the end of the return pass.
He failed to do so but Salah was following up behind him and, having nicked it past Nayef Aguerd, he was tripped by the West Ham centre-back, who looked suitably sheepish having given away such a soft spot-kick.
West Ham could have been two goals up by that point as Alisson had to scramble low to his right to keep out a Tomas Soucek header and was then relieved to see Michail Antonio wastefully direct a header wide from 10 yards.
From another counter-attack Mac Allister dragged a shot wide and Salah miscued a shot from Van Dijk's diagonal pass but almost inadvertently found Nunez.
Liverpool were threatening to take the game away from the visitors, who have won only once at Anfield in 50 visits, and, had Salah slotted home after Mac Allister, Diaz and Dominik Szoboszlai combined, it would have been their goal of the season so far.
But David Moyes' side are made of stern stuff, with their physical approach often infuriating the majority of those at Anfield, and when Soucek's scuffed shot was deflected wide it showed danger was still present.
They equalised three minutes from half-time from a goal which came almost out of nothing. Bowen won the initial header from an aimless aerial ball and Vladimir Coufal swung in a cross which the Hammers forward dived low in front of Van Dijk to direct inside the far post.
A delightful Szoboszlai chip over the top saw Curtis Jones volley home only to be denied by the offside flag while another counter-attack saw Salah slide in Nunez, whose angled shot was claimed at the second attempt by Alphonse Areola.
After the break West Ham reduced the game to a level Liverpool were uncomfortable with but the hosts still created chances, Nunez's snap-shot going wide after Salah managed to find space between two markers to pick him out 12 yards out.
It was the sighter the Kop's new cult hero needed as he then lashed home Mac Allister's delicate 15-yard chip which dropped invitingly somewhere near the penalty spot.
Jones' deflected shot was acrobatically tipped over by Areola, who then saved at the feet of Diaz, before Jota extended Moyes' win-less career run at Anfield to 20 visits by stabbing home from close range after Van Dijk's knockdown from an 85th-minute corner.
*copy from Press Association.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here