A stirring QPR performance helped their Premier League survival hopes, while heightening a beaten Sunderland's own relegation fears.
The Black Cats took the lead when striker Steven Fletcher turned in a low Adam Johnson cross.
But Loic Remy pounced on a fortunate deflection to deservedly equalise by angling in a shot past Simon Mignolet.
Andros Townsend scored with a 22-yard strike and Jermaine Jenas added a third late on to seal the three points.
The scenes of joy at the final whistle illustrated a renewed sense of optimism at QPR, while the performance provided evidence of a defensive resilience allied to a new-found ability to score goals.
The R's had four points from 13 games when manager Harry Redknapp took over but have since collected 19 from 16 games and, while they remain bottom of the table and four points from safety, the belief that they can avoid relegation is growing.
Victory saw QPR achieve back-to-back top-flight wins for the the first time since December 1995 and, more importantly, made the relegation picture look a good deal tighter.
Sunderland will certainly be looking over their shoulder. Having not won in six league games they are now only six points from the relegation zone.
For the home side, in the week the club announced financial results showing debts of £89m, the pressure to avoid relegation was clearer than ever.
Nevertheless, Rangers, and Junior Hoilett in particular, did not let this inhibit them. The winger jinked his way into the area before angling a shot a whisker wide and was soon on the attack again, cutting inside and hitting a shot that again swerved wide.
The visitors had struggled to work any chances in the opening 20 minutes but stunned Loftus Road when Fletcher scored from a swift counter-attack for his 11th goal of the season.
Townsend's free-kick for the hosts was spilled by Black Cats keeper Mignolet, and after Titus Bramble cleared upfield, Stephane Sessegnon found Johnson, who drilled a ball in for Fletcher to turn home from six yards.
If that was harsh on QPR, they had a slice of fortune to thank for their equaliser, when Townsend's shot deflected off defender John O'Shea straight into the path of Remy, who sidefooted in for his third goal in five games.
It was QPR's first league goal at Loftus Road since Boxing Day and the team with the worst home goalscoring record in the Premier League soon threatened more.
Zamora cushioned a header into the path of Remy but he volleyed wildly over, before Stephane Mbia had a long-range shot gathered at the second attempt by Mignolet.
QPR had failed to replicate their first-half form after the interval but Townsend, a January loan signing from Tottenham, sparked them back into life when he put the home side in front with 20 minutes to go.
The midfielder chested down a clearance and half-volleyed a dipping shot into the top corner out of Mignolet's reach.
Substitute Jenas, another January arrival from Spurs, completed the west London side's victory when he produced a scorching shot to beat Mignolet in the final minute.
Sunderland manager Martin O'Neill: "We need to start winning, really. I think next week [against Norwich] is a big, big game for us.
"We have difficult fixtures coming up, including Norwich. We have our work cut out. We have known that since the start of the season.
"It has been tough going throughout the season and we have to fight through these last nine games."