Jonjo Shelvey was the only Liverpool player to celebrate a goal here at Upton Park and as well he might. Cast in the role of the false nine, as his club arrived in London without a recognised striker, due to the suspension of Luis Suárez and Fabio Borini's injury, Shelvey compensated for his lack of comfort as the line's leader with old-fashioned blood and sweat.

His reward was glorious. Shelvey will struggle to claim the winning goal, as the crucial touch came off the West Ham United defender James Collins, but he was the central figure from a Liverpool perspective when the substitute Jordan Henderson flashed in his 79th-minute cross.

Shelvey supported West Ham as a boy and his goalscoring team-mates, Glen Johnson and the substitute Joe Cole, began their careers at the club. They did not celebrate their goals, which were of the highest class, particularly Johnson's, yet Shelvey basked in his moment, perhaps feeling a release of frustration. He cavorted in front of Liverpool's fans, shaping his hands as a pretend pair of spectacles: he is, apparently, the only member of his family that does not need glasses.

It was the final act of what Sam Allardyce, called a "bizarre" game. The West Ham manager noted that Liverpool matches were normally tight and without Suárez, the club's goalscoring talisman, this one would surely be more so. "I certainly didn't expect two ex-West Ham players to score for them," Allardyce said. Or, maybe, the Liverpool captain Steven Gerrard to give the home side a half-time lead with the first own goal of the game.

The winning goal, Allardyce said, was "freaky" yet the disappointment of the defeat was compounded for him by the loss of Mohamed Diamé, his most creative player. Diamé had thrilled with his rampaging runs from midfield but he felt his hamstring snap on 73 minutes and collapsed in agony. "The signs are not good," Allardyce said. "It's a serious tear and that can be anything up to eight, 10, 12 weeks. It's yet another injury blow for us."

At least, it might deter the January transfer window predators, who have indicated a readiness to exploit the release clause in Diamé's contract. "I'd sooner have the aggravation in January of people trying to get him and him playing like he has done for us than lose him like this to injury," Allardyce said.

West Ham conceded the decisive goals after Diamé's departure on a stretcher but they had been advertised, as Liverpool, composed upon the second-half restart, had taken a grip on proceedings. Stewart Downing created chances for Raheem Sterling and Shelvey before Cole took Sterling's pass and finished with ice-cool confidence. His first Premier League goal since April of last year would have been enough for the headline writers but Shelvey helped to trump him and secure a big win for Brendan Rodgers.

"Even without Luis, there was quality and fight in the team," the Liverpool manager said. "The players were brilliant. We have been through a lot this week, in terms of getting back a day late [from Thursday's Europa League win over Udinese] and I thought we thoroughly deserved this. We are making steady progress."

Suárez's one-match absence had overshadowed the buildup but the outstanding Johnson seemed intent on filling the creative void. The right-back pushed high up the field at the outset to worry Matt Jarvis, West Ham's covering winger, who was rather more comfortable in the attacking third.Johnson's goal was the sort to draw the breath, banged in unerringly with his right foot into the far top corner from the edge of the area. The euphoria surged inside him but, as Cole would do, he kept it there.

Sterling missed a glorious chance for 2-0, after Johnson had beaten Jarvis to cross, but West Ham fought their way back. Daniel Agger made a saving clearance ahead of Carlton Cole from Jarvis's cross and the game turned for the first time on West Ham's penalty. Guy Demel's rasping shot struck Joe Allen's outstretched arm, as the Liverpool midfielder attempted to close him down and Mark Noble showed no sympathy with a clinical low conversion.

Things got worse for Liverpool when Gerrard, under no real pressure from a West Ham player, misdirected an attempted clearing header and watched the ball loop apologetically beyond his own goalkeeper, Pepe Reina. Liverpool, though, regrouped and the second half was theirs. So were the points.

Man of the match Glen Johnson (Liverpool)