Mark Noble boosted West Ham's bid to avoid relegation from the Premier League as the midfielder sealed a 1-0 win over Burnley at the London Stadium on Wednesday.
Slaven Bilic's side had been dragged into the fight for survival after a miserable run of six games without a win.
But Noble's strike in first half stoppage-time, coming from the rebound after he missed a penalty, ended West Ham's long wait for a victory and moved the east Londoners four points clear of the relegation zone.
The Hammers are now only one point behind Burnley, who once again endured a miserable experience on their travels.
With fixtures against fellow strugglers Burnley and Hull this week, Bilic had admitted it was crunch time for the Hammers and he received a timely pre-match boost when targetman Andy Carroll was declared fit for his first start since August.
Carroll was one of two changes from the 2-2 draw at Liverpool on Sunday and he almost made an immediate impact when he met Michail Antonio's cross with a header that drifted narrowly wide.
Bilic's men appealed in vain for a penalty when Winston Reid's header appeared to strike Michael Keane's hand.
Carroll was next to feel aggrieved when he went to ground after a clash with Matt Lowton that he protested was worthy of punishment from referee Robert Madley.
Pedro Obiang nearly made West Ham forget their complaints when his powerful long-range effort beat Heaton, only to cannon back off a post.
When Noble also hit the woodwork, the hosts might have been thinking it wasn't going to be their night, but they finally broke the deadlock in first half stoppage-time.
Burnley defender Ben Mee hauled back Reid as he shaped to shoot and Madley awarded a clear penalty.
Noble's spot-kick was saved by Heaton, but the alert West Ham midfielder redeemed himself when he got to the rebound first and slotted home.
Saturday's 3-2 win over Bournemouth had lifted Burnley away from the bottom three, but the Clarets had only picked up one point away from home in six games and this was proving another fruitless trip.
Burnley mounted found some momentum after the break and Sam Vokes flicked his shot wide from an incisive break.
Vokes was profligate again when he headed over from close-range after West Ham goalkeeper Darren Randolph had saved from Scott Arfield.
Randolph excelled himself to keep out another Arfield strike moments later.