West Ham gave boss Sam Allardyce the perfect present ahead of his 60th birthday on Sunday with three points at Burnley.
Allardyce, once the manager of Burnley's bitter rivals Blackburn, is staying in the north-west to celebrate, and will do so in good spirits after the 3-1 victory lifted them, at least temporarily, into the top four in the Barclays Premier League.
Burnley dominated the first half but Diafra Sakho's sixth goal in as many games gave West Ham the lead in the 49th minute, and Enner Valencia doubled that five minutes later.
George Boyd pulled one back on the hour mark but substitute Carlton Cole ended the Clarets' hopes of a comeback to leave Sean Dyche's side still searching for a first win back in the top flight.
The international break allowed Burnley's injury problems to ease and Danny Ings, David Jones and defender Kieran Trippier all started, while Mark Noble made his 200th Premier League appearance for West Ham.
The return of last season's leading scorer Ings from a hamstring problem was particularly welcome given Burnley's problems in front of goal and he was straight into the action, seeing a shot blocked by James Collins.
They came even closer in the fifth minute, Boyd controlling Trippier's deflected cross and firing a brilliant left-footed volley against the underside of the bar.
Lukas Jutkiewicz did have the ball in the net three minutes later but the former Middlesbrough man was denied a first Burnley goal, correctly, by an offside flag.
Ings had created the opening with a jinking run into the box and shot that was fumbled by Adrian into Jutkiewicz's path.
It was a frustrating 10 minutes for Jutkiewicz, who then headed Trippier's cross over the bar before being unable to capitalise after two West Ham defenders fell over in the area.
The Hammers had not got going, and Allardyce was unimpressed with Sakho, who appeared more concerned by an impending challenge from Jason Shackell then Aaron's Cresswell's fine cross and headed well wide from close range.
The classy presence of Boyd in midfield had caught the eye and more trickery from him on the half-hour mark created another opening for Burnley.
Michael Kightly looked poised for a free header from Boyd's cross at the far post but Jutkiewicz took the ball away from his team-mate, leaving Kightly with head in hands.
There was a narrow escape for the hosts down the other end as Stewart Downing cut inside on the right of the area and curled a shot against the far post.
Dyche would have been encouraged by his side's first-half display but frustrated they could not make the most of their superior chances.
And they were made to pay four minutes into the second half when Cresswell curled over a superb cross and Sakho, this time with his eyes firmly on the target, headed in.
Five minutes later it was 2-0, Carl Jenkinson the architect from the right this time and Valencia applying the finishing touch with a fine header from 10 yards.
It was very nearly three as Cole - on for Valencia - got his head to a corner only to see it cleared off the line by Kightly, and from there Burnley went down the other end and pulled one back.
Ings won a corner and then made a nuisance of himself as Adrian tried to collect the cross, allowing Boyd to slam the ball home. Adrian appealed for a free-kick but the blame appeared to lie squarely with him.
It was the boost Burnley needed and they almost drew level immediately but Ings' header from Trippier's cross flew agonisingly wide of the far post.
However, West Ham did a good job of seizing back the momentum and quietening the crowd and, with 20 minutes to go, they restored their two-goal advantage.
It was another cross that undid Burnley, Noble's corner picking out Sakho, who headed across the six-yard box for Cole to nod in.
Downing almost added a fourth with a rasping shot that flew just wide, while Cresswell poked a shot straight at Heaton.
Burnley's afternoon was rather summed up three minutes from time when the excellent Trippier crossed for substitute Ashley Barnes to slam a shot against the bar.