Match ends, West Ham United 1, Liverpool 2.
Steven Gerrard scored two penalties as Liverpool regained the Premier League leadership with an incident-packed victory at West Ham.
The club captain put his team in front after James Tomkins handled.
But Guy Demel tapped in from three yards in first-half stoppage time as Liverpool appealed that Andy Carroll had fouled keeper Simon Mignolet.
Carroll hit the bar with a second-half header, before Gerrard struck again after Adrian brought down Jon Flanagan.
Luis Suarez struck the bar twice for Liverpool, who move two points ahead of second-placed Chelsea with a ninth successive league victory.
Suarez, who is the Premier League's leading scorer, was unable to add to his season's tally of 29, although he went close twice in the opening 20 minutes.
Having brushed the top of the net with a third-minute free-kick, he then caught West Ham out after receiving Philippe Coutinho's quick throw-in wide on the left, angling a chip that bounced out off the bar.
Suarez's strike partner Daniel Sturridge - who has 20 league goals for the season - snatched at a chance to add to that total, firing over when a cross from the Uruguay international fell to him via West Ham defender Tomkins.
And it was Tomkins who handed Liverpool the chance to take the lead a minute before half-time.
The centre-back handled the ball as Suarez tried to cut inside him after breaking on to Gerrard's 50-yard diagonal pass. Gerrard converted the penalty, sending goalkeeper Adrian the wrong way.
But in the second minute of first-half stoppage time West Ham equalised, with the visitors convinced the goal should not have stood.
Former Liverpool striker Andy Carroll - playing against his former club for the first time since leaving for Upton Park, initially on loan, in 2012 - put a hand into the face of keeper Mignolet as they jumped for Mark Noble's corner, and the Belgian dropped the ball into the path of Demel, who turned in from three yards.
Assistant referee Stuart Burt raised his flag for an infringement but, after consulting him, referee Anthony Taylor awarded the goal.
There was further controversy in the early minutes of the second half when Carroll was manhandled in a crowded penalty area as he tried to jump for a corner, but Taylor allowed play to continue.
England striker Carroll made life difficult for Liverpool's central defensive pairing of Mamadou Sakho and Martin Skrtel, and nearly got his reward when he climbed to meet Mohamed Diame's right-wing cross, heading firmly at goal but seeing the effort smack against the bar.
Referee Taylor had another big decision to make with 19 minutes to go, as full-back Flanagan burst into the penalty area on to Lucas Leiva's pass before going down under Hammers keeper Adrian's challenge.
The keeper and his team-mates were adamant he got a hand on the ball, while Liverpool felt he also went on to catch Flanagan's leg.
Gerrard kept his nerve to fire in to the corner and restore the visitors' advantage.
Suarez almost made the game safe with seven minutes to go, curling a 20-yard shot against the bar with the outside of his boot, while Raheem Sterling's shot from the edge of the penalty area needed to be turned around the near post by Adrian.
Liverpool saw off a late flurry of West Ham pressure to extend their unbeaten league run to 14 matches.
For a photo gallery from Sunday's Premier League action, visit the BBC Sport Facebook page.
- 13AdriánBooked at 70mins
- 8ArmeroBooked at 86mins
- 14TaylorSubstituted forJarvisat 78'minutes
- 5TomkinsBooked at 43mins
- 21DiaméSubstituted forColeat 85'minutes
- 4NolanSubstituted forNocerinoat 68'minutesBooked at 80mins
- 10CoutinhoSubstituted forLeivaat 45'minutes
- 15SturridgeSubstituted forK Touréat 85'minutes
- 4K Touré
- 9Iago Aspas
- Anthony Taylor
- Shots on Target
Second Half ends, West Ham United 1, Liverpool 2.
Corner, Liverpool. Conceded by Adrián.
Attempt saved. Raheem Sterling (Liverpool) right footed shot from outside the box is saved in the top left corner. Assisted by Jordan Henderson.
Foul by Jon Flanagan (Liverpool).
Matthew Jarvis (West Ham United) wins a free kick in the defensive half.
Attempt missed. Stewart Downing (West Ham United) right footed shot from outside the box misses to the right. Assisted by Pablo Armero.
Foul by Jordan Henderson (Liverpool).
Stewart Downing (West Ham United) wins a free kick in the defensive half.
Attempt saved. Luis Suarez (Liverpool) right footed shot from outside the box is saved in the bottom right corner.
Pablo Armero (West Ham United) is shown the yellow card for a bad foul.
Luis Suarez (Liverpool) wins a free kick in the attacking half.
Foul by Pablo Armero (West Ham United).
Substitution, Liverpool. Kolo Touré replaces Daniel Sturridge.
Substitution, West Ham United. Carlton Cole replaces Mohamed Diamé.
Luis Suarez (Liverpool) hits the bar with a right footed shot from the right side of the box. Assisted by Raheem Sterling.
Attempt missed. Guy Demel (West Ham United) header from the right side of the six yard box misses to the right. Assisted by Antonio Nocerino with a cross following a set piece situation.
Foul by Jon Flanagan (Liverpool).
Matthew Jarvis (West Ham United) wins a free kick on the right wing.
Attempt saved. Daniel Sturridge (Liverpool) left footed shot from the left side of the box is saved in the bottom left corner. Assisted by Raheem Sterling with a through ball.