Paul Lambert's celebrations on the touchline said it all. Jumping up and down and climbing all over his assistant, Ian Culverhouse, the Villa manager exuded a mixture of joy and relief when Christian Benteke registered his 17th goal of the season to vanquish Queens Park Rangers and lift the Midlands club six points clear of the relegation zone.

An absorbing game swung one way and then the other as Villa recovered from a dismal first-half performance, when they fell behind to a goal from Jermaine Jenas and were extremely fortunate to go in on level terms, to secure back-to-back Premier League victories for the first time since May 2011.

For QPR, there was only bitter disappointment. Harry Redknapp was left to rue their failure to turn their overwhelming superiority before the interval into more goals. Anchored to the foot of the table and seven points adrift of a safe position, QPR's hopes of survival were dealt a huge blow on a dramatic afternoon.

Gabriel Agbonlahor's equaliser in first-half injury time was the turning point, with the forward's header changing the complexion of this match. Villa were unrecognisable in the second half from the team that had been indebted to Brad Guzan in the opening 45 minutes and relieved to see José Bosingwa's free-kick hit the upright. Agbonlahor's header galvanised Lambert's side and it was no surprise when they took the lead through the outstanding Andreas Weimann, who left the field to a standing ovation six minutes from time.

Although Rangers hauled themselves back into the game when Andros Townsend's deflected shot beat Guzan to make it 2-2, the visitors never looked comfortable defensively in the second half. They also badly missed Bobby Zamora, who had been laid low with flu all week and was unable to continue at half-time, leaving them without a focal point to hold the ball up.

Villa, to their credit, kept plugging away and refused to allow Townsend's strike to derail them. Weimann, defending at one end and attacking at the other, epitomised that persistence, which was rewarded in the lead-up to Villa's crucial third goal. The Austrian wriggled clear in the area, after clever play from Charles N'Zogbia, and cut the ball back for Benteke to sweep home with Júlio César stranded.

QPR could still have salvaged a point but Loïc Rémy profligately headed wide with the goal at his mercy, and Clint Hill, in the final seconds of five minutes of added time, thundered a shot from the edge of the area that was deflected over. QPR's hopes of getting anything from the match disappeared with that half-chance, leaving Redknapp to reflect on what have been.

"If we had come in 4-0 up at half-time it would have been about right," the QPR manager said. "That's the best I've seen us play first half. It was so one-sided, it was unbelievable for an away team to dominate like that.

"I just wanted to get to half-time one up but we messed around, they broke on us and it was a ball hung in the box that we should have dealt with. Suddenly they've got a lift after being absolutely awful first half and probably couldn't believe their luck. That goal knocked us for six."

Lambert could have been forgiven for fearing the worst when Jenas, who made only three appearances during a season-long loan at Villa last season, punished a bad mistake from the substitute Joe Bennett in the 23rd minute. By that point Guzan had already denied Christopher Samba with two brilliant saves, and later in the first half the American tipped a curling shot from Rémy over the bar.

"Guzan made three world-class saves, then they hit the post with a terrific free-kick," Lambert said. "But you need luck at certain times in football."

The Villa manager was full of praise for his players' second-half performance, when they took the game to QPR. "We scored right at the death of the first half and after that we were exceptional," said Lambert, who paid tribute to Weimann for his man-of-the-match display. "Andi Weimann is a phenomenal lad to work with. If he keeps his great enthusiasm for the game throughout his career he'll have a big career," he said.

With two relegation rivals defeated in eight days, it has been a hugely rewarding period for Lambert and safety is now firmly in their own hands.

"There are eight games to go but we've got momentum there," Lambert said. "We have a really tough game versus Liverpool next but the crowd are right with us."