Aston Villa moved out of the Barclays Premier League bottom three as second-half goals from Christian Benteke and Charles N'Zogbia earned then a 2-1 victory over West Ham at Villa Park.
Benteke broke the deadlock from the penalty spot with his 15th goal of the campaign and N'Zogbia made the points safe with a superb free-kick.
Ashley Westwood's late own goal could not prevent Villa's first win in nine league games and ended a run of four successive home league defeats.
Paul Lambert's side also looked more secure in defending set pieces than in recent games with Ciaran Clark impressive.
It was a vital three points for the club ahead of successive matches away to Arsenal and at home to Manchester City.
But West Ham have now lost five successive away games and are in danger of being sucked towards the relegation zone.
Lambert handed a first league start to striker Jordan Bowery, a £600,000 summer signing from Chesterfield, in place of the ill Gabriel Agbonlahor.
Villa started brightly and Andreas Weimann missed a golden opportunity to put them ahead after less than two minutes.
Hammers keeper Jussi Jaaskelainen failed to hold a dipping shop from Benteke and the rebound fell to Weimann unmarked six yards out.
But the Austrian placed the ball wide of the far post with the goal at his mercy and held his head in his hands.
Weimann then raced onto a flick from Benteke but Hammers defender James Tomkins was alert to the situation and tidied up.
Andy Carroll, fresh from his winner against Swansea last weekend, was only just too high with a first time lob which landed on the top of the net that left Villa keeper Brad Guzan backpedalling.
Carroll and Villa defender Nathan Baker both needed lengthy treatment after a clash of heads when attacking the ball from N'Zogbia's corner.
West Ham were forced into a change after 24 minutes with right-back Joey O'Brien suffering a leg injury in a strong but fair challenge from Baker before being replaced by Guy Demel.
Villa skipper Ron Vlaar shot just over at the near post after attacking a Westwood corner but play struggled to move out of second gear during the opening 45 minutes.
Hammers on loan defender Emanuel Pogatetz was booked in first half injury-time for a foul on N'Zogbia.
West Ham dominated the early stages of the second period possession-wise and appealed in vain for a penalty after a challenge by Vlaar on Carroll.
Villa defender Clark made a crucial clearance from a Mohamed Diame ball into the danger area after Guzan had failed to make a clean punch on his attempted clearance.
Lambert made a double change after 63 minutes with Darren Bent and January loan signing Simon Dawkins replacing Bowery and Weimann respectively.
N'Zogbia curled a shot just past the far post after being teed up by Benteke.
But Bent came to Villa's rescue when he cleared a low goal-bound shot from Carroll.
Baker was yellow carded for bringing down Joe Cole in full flight but after 74 minutes Villa were celebrating as they broke the deadlock through Benteke's 15th goal of the campaign.
Referee Mark Clattenburg awarded a penalty after Mark Noble brought down N'Zogbia.
Up stepped Benteke to send Jaaskelainen the wrong way with his spot-kick.
With 11 minutes left N'Zogbia doubled Villa's lead with a superb free-kick after Tomkins brought down Bent.
N'Zogbia curled the ball over the defensive wall and past Jaaskelainen for his first Premier League goal of the campaign.
Westwood unintentionally set up a tense finale when he headed the ball past Guzan from a Joe Cole cross.
Then in injury-time Guzan blocked a shot from Kevin Nolan and turned aside a Carlton Cole header as Villa survived by the skin of their teeth.