Andy Carroll scored twice as West Ham moved up to third in the Premier League with victory against 10-man Swansea.
Wilfried Bony put the visitors ahead with a clinical finish but Carroll headed in the equaliser for his first goal since March.
Bony then hit the bar but Carroll netted again with a second header.
Swansea goalkeeper Lukasz Fabianski was sent off for a foul on Diafra Sakho, who then wrapped up victory with an emphatic strike late on.
The win, West Ham's third in succession, means they have 27 points and are six behind second-place Manchester City.
Former Hammers striker John Hartson: "Carroll's performance was a superb example of the art of an old-fashioned centre-forward. Swansea simply could not cope with him and it was the sort of display I would have been proud of myself."
Under Sam Allardyce, the Hammers have undergone something of a reinvention this season, playing a more flowing, inventive passing style instead of the direct football they had become known for in recent years.
That was on display early on as Swansea, who had not won away from home in the league since beating Manchester United 2-1 in the first game of the season, toiled in the opening stages.
But with Bony, the Premier League's top scorer in 2014, Swansea would always be threatening with the few chances they created, and that proved the case midway through the first half as they snatched the lead.
Gylfi Sigurdsson and Jefferson Montero combined to open up the West Ham defence before Montero pulled the ball back for Bony to sidefoot home from the middle of the area.
The goal unsettled West Ham and ushered in a period of Swansea dominance as Sigurdsson and Bony both had shots flash wide of goal.
It prompted West Ham to go more direct, and it was a tactic that paid dividends just before the break as Carl Jenkinson clipped the ball into the box and Carroll rose highest to nod a trademark header into the far corner.
While a danger at set pieces, Carroll struggled to form an effective partnership with Enner Valencia, who was replaced at half-time by Sakho. His pace, coupled with Carroll's physical presence, posed a constant menace to the Swansea defence in the second half.
Bony launched an effort against the bar for Swansea, but it was a rare foray forward and instead West Ham took the lead, Carroll again climbing highest to direct a header from Stewart Downing's corner beyond Fabianski.
Minutes later, Swansea's and Fabianski's afternoon got worse as the Polish goalkeeper was shown a red card after he charged out of his area and clattered into Sakho.
That effectively ended the visitors' chances of getting back into the game and instead Sakho made the points safe as he burst through to fire in a third from Carroll's headed pass.
"We did not make enough correct decisions. The only time we did that we scored the goal.
"We didn't do that enough and really some of the defending, we gifted it to them on a plate to be honest. No complaints with the result, we didn't deserve anything from the game."
On Fabianski's sending off: "If you look at the build-up to it, he [Sakho] knocks the ball past the keeper with his hand. Realistically it should have been a free-kick to us, it wasn't a clear goalscoring opportunity either. Hopefully we will appeal it."
Match ends, West Ham United 3, Swansea City 1.
Second Half ends, West Ham United 3, Swansea City 1.
Offside, Swansea City. Ashley Richards tries a through ball, but Bafétimbi Gomis is caught offside.
Kyle Bartley (Swansea City) wins a free kick in the attacking half.
Attempt saved. Diafra Sakho (West Ham United) left footed shot from the centre of the box is saved in the bottom left corner. Assisted by Stewart Downing with a through ball.
Attempt saved. Diafra Sakho (West Ham United) right footed shot from the left side of the six yard box is saved in the centre of the goal.
Corner, West Ham United. Conceded by Ashley Richards.
Goal! West Ham United 3, Swansea City 1. Diafra Sakho (West Ham United) right footed shot from the centre of the box to the high centre of the goal. Assisted by Andy Carroll with a headed pass.
Substitution, Swansea City. Nathan Dyer replaces Angel Rangel.
Substitution, West Ham United. James Collins replaces Cheikhou Kouyaté.
Kyle Bartley (Swansea City) wins a free kick on the right wing.
Attempt missed. Kyle Bartley (Swansea City) right footed shot from outside the box is too high. Assisted by Wilfried Bony following a corner.
Attempt blocked. Gylfi Sigurdsson (Swansea City) left footed shot from the left side of the box is blocked. Assisted by Ki Sung-Yueng.
Attempt blocked. Gylfi Sigurdsson (Swansea City) right footed shot from the centre of the box is blocked.
Corner, Swansea City. Conceded by Alexandre Song.
Corner, Swansea City. Conceded by Andy Carroll.
Attempt blocked. Wilfried Bony (Swansea City) right footed shot from the centre of the box is blocked. Assisted by Gylfi Sigurdsson with a cross.
Substitution, West Ham United. Joey O'Brien replaces Carl Jenkinson because of an injury.
Attempt blocked. Bafétimbi Gomis (Swansea City) left footed shot from the right side of the box is blocked.
Diafra Sakho (West Ham United) hits the left post with a right footed shot from the right side of the box. Assisted by Alexandre Song.
Substitution, Swansea City. Bafétimbi Gomis replaces Jefferson Montero.
Offside, West Ham United. Carl Jenkinson tries a through ball, but Diafra Sakho is caught offside.
Substitution, Swansea City. Gerhard Tremmel replaces Leon Britton.
Lukasz Fabianski (Swansea City) is shown the red card.