Two Paul Pogba penalties earned lethargic Manchester United a 2-1 victory over West Ham United in the Premier League at Old Trafford on Saturday.

Having lost five of their previous six matches in all competitions, United looked short on confidence early on against West Ham, who had a goal ruled out in the 10th minute when Felipe Anderson was adjudged to be offside when finding the net.

That tight call went United’s way, and soon after they were in front when Pogba hammered home a 19th minute penalty, much to the relief of the home crowd.

Even with the lead, United remained sluggish and did not muster another shot on target for the rest of the first half during which they saw less of the ball than their visitors.

The interval did little to rejuvenate United with Anderson’s first goal in 14 league games drawing the visitors level just four minutes into the second period.

Michail Antonio twice went close to completing the turnaround for West Ham, but United stole all three points after Pogba again converted from the spot 10 minutes from time.

The win ensured United climbed above Arsenal into fifth place, two points behind Chelsea, while West Ham stayed 11th.

“They played better than us, it is fair to say, I don’t think anyone will disagree,” United manager Ole Gunnar Solskjaer said. “We got away with it. Sometimes we have lost when we should have won, so over a season it evens itself out.”

Marcus Rashford was not fit enough to start for United, with Solskjaer making five changes from the side beaten by Barcelona in the Champions League in midweek, but the reshuffle did little to lift United as the Hammers controlled the opening exchanges.

Anderson sent the visiting supporters into raptures after converting former United striker Javier Hernandez’s knockdown, but the linesman’s flag denied the Brazilian.

United, though, were gifted the opportunity to break the deadlock through Pogba after Robert Snodgrass fouled Juan Mata in the penalty area.

West Ham, still on top after the break, equalised through Anderson, who lost his marker Marcos Rojo to fire Manuel Lanzini’s cross past De Gea.

Substitute Antonio hit the bar with a thunderous strike from distance and was then denied by a brilliant De Gea save.

That stop proved crucial as Anthony Martial then raced clear before being upended in the area, with Pogba stepping up to fire in his seventh successful penalty of the season.

“We deserved more,” West Ham manager Manuel Pellegrini said. “It was a pleasure for me to see my team play like this against Manchester United in their own stadium.”