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.
Redknapp enjoys 'good day' for QPR
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.
Jonathan PearceBBC Match of the Day commentator
"QPR played so well at times. There were good performances all round and good work rate. They thoroughly deserved this one."
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.
Steven Fletcher has scored seven opening goals in the Premier League this season, more than any other player.
Jermaine Jenas scored his first Premier League goal since September 2009.
QPR scored as many goals in this game as in their previous seven Premier League home games.
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.
O'Neill concerned by loss of form
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."
Full Time The referee signals the end of the game.
Inswinging corner taken from the right by-line by Adam Johnson, Rob Green makes a save.
Steven Fletcher challenges Clint Hill unfairly and gives away a free kick. Rob Green takes the direct free kick. Jamie Mackie takes a shot. Save made by Simon Mignolet. David Vaughan fouled by Andros Townsend, the ref awards a free kick. Sebastian Larsson takes the direct free kick. Steven Fletcher takes a shot. Save made by Rob Green.
Andros Townsend provided the assist for the goal.
89:28 Goal scored
Goal! - Jermaine Jenas - QPR 3 - 1 Sunderland Jermaine Jenas grabs a goal from outside the penalty box to the bottom right corner of the goal. QPR 3-1 Sunderland.
Jose Bosingwa decides to take the corner short.
Unfair challenge on Jermaine Jenas by Sebastian Larsson results in a free kick. Rob Green takes the direct free kick.
Corner from the right by-line taken by Jose Bosingwa, Christopher Samba has a header from inside the six-yard box and clears the crossbar.
Corner taken by Sebastian Larsson played to the near post, Clint Hill makes a clearance.
Jamie Mackie fouled by Titus Bramble, the ref awards a free kick. Shot comes in from Jose Bosingwa from the free kick.
Jose Bosingwa takes the free kick.
Substitution Phil Bardsley is brought on as a substitute for Jack Colback.
Substitution Jermaine Jenas joins the action as a substitute, replacing Loic Remy.
Jack Colback challenges Shaun Wright-Phillips unfairly and gives away a free kick.
Substitution David Hoilett leaves the field to be replaced by Shaun Wright-Phillips.
Corner taken left-footed by Adam Johnson to the near post, Jamie Mackie manages to make a clearance.
Substitution David Vaughan on for Alfred N'Diaye.
Substitution Jamie Mackie replaces Bobby Zamora.
Fabio Da Silva takes the free kick.
Booking Caution for Craig Gardner.
Free kick awarded for a foul by Craig Gardner on David Hoilett.
David Hoilett provided the assist for the goal.
69:58 Goal scored
Goal! - Andros Townsend - QPR 2 - 1 Sunderland Andros Townsend gets on the score sheet with a goal from outside the box to the bottom left corner of the goal. QPR 2-1 Sunderland.
Andros Townsend fouled by Danny Rose, the ref awards a free kick. The free kick is swung in right-footed by Jose Bosingwa, save by Simon Mignolet.
Outswinging corner taken from the left by-line by Adam Johnson.
Andros Townsend takes a shot. John O'Shea gets a block in.
Sebastian Larsson challenges David Hoilett unfairly and gives away a free kick. Direct free kick taken by Fabio Da Silva.
Christopher Samba challenges Titus Bramble unfairly and gives away a free kick. Simon Mignolet takes the direct free kick.
Foul by Danny Rose on Andros Townsend, free kick awarded. Jose Bosingwa restarts play with the free kick.
Direct free kick taken by Jose Bosingwa.
Booking The referee cautions Alfred N'Diaye for unsporting behaviour.
Loic Remy fouled by Alfred N'Diaye, the ref awards a free kick.
Substitution Danny Rose comes on in place of Danny Graham.
Outswinging corner taken left-footed by Adam Johnson played to the near post, clearance made by Clint Hill.
Stephane Sessegnon produces a left-footed shot from just outside the box that goes wide left of the goal.
Free kick awarded for an unfair challenge on Jose Bosingwa by Jack Colback. Jose Bosingwa restarts play with the free kick.
Shot from just outside the box by Adam Johnson misses to the right of the target.
The referee gets the second half started.
45:00 +1:04 Half time
Half Time The players leave the pitch at half time.
Foul by Alfred N'Diaye on Andros Townsend, free kick awarded. Direct free kick taken by Jose Bosingwa.
Corner taken by Jose Bosingwa played to the near post, John O'Shea makes a clearance.
Stephane Mbia takes a shot. Save by Simon Mignolet.
Alfred N'Diaye challenges Bobby Zamora unfairly and gives away a free kick. Stephane Mbia takes the direct free kick.
Inswinging corner taken by Jose Bosingwa from the left by-line, Simon Mignolet makes a save.
Effort on goal by Loic Remy from deep inside the area goes harmlessly over the bar.
Loic Remy takes a shot. Save by Simon Mignolet.
Free kick awarded for a foul by Stephane Mbia on Alfred N'Diaye. John O'Shea restarts play with the free kick.
Andros Townsend provided the assist for the goal.
29:24 Goal scored
Goal! - Loic Remy - QPR 1 - 1 Sunderland Loic Remy finds the net with a goal from inside the penalty area to the bottom left corner of the goal. QPR 1-1 Sunderland.
Andros Townsend takes a shot. Blocked by John O'Shea.
Free kick awarded for an unfair challenge on David Hoilett by Craig Gardner. Direct free kick taken by Fabio Da Silva.
Danny Graham produces a header from inside the six-yard box that clears the bar.
Sebastian Larsson concedes a free kick for a foul on Andros Townsend. Stephane Mbia takes the direct free kick.
Effort on goal by Stephane Mbia from outside the penalty box goes harmlessly over the bar.
Free kick awarded for an unfair challenge on Ji-Sung Park by Sebastian Larsson. Jose Bosingwa delivers the ball from the free kick right-footed from left channel, Jack Colback makes a clearance.
Assist by Adam Johnson.
19:23 Goal scored
Goal! - Steven Fletcher - QPR 0 - 1 Sunderland Steven Fletcher scores a goal from close range to the bottom left corner of the goal. QPR 0-1 Sunderland.
Bobby Zamora fouled by John O'Shea, the ref awards a free kick. The free kick is swung in left-footed by Andros Townsend, Simon Mignolet makes a save.
Alfred N'Diaye has an effort at goal from outside the penalty area missing to the wide left of the goal.
Free kick awarded for a foul by Jack Colback on Ji-Sung Park. Jose Bosingwa takes the direct free kick.
Effort from outside the penalty box by David Hoilett goes wide right of the goal.
Effort on goal by Andros Townsend from outside the box goes harmlessly over the bar.
David Hoilett fouled by Stephane Sessegnon, the ref awards a free kick. Direct free kick taken by Rob Green.
Loic Remy gives away a free kick for an unfair challenge on Alfred N'Diaye. Simon Mignolet takes the direct free kick.
Shot by David Hoilett from deep inside the penalty area misses to the right of the goal.
John O'Shea challenges Stephane Mbia unfairly and gives away a free kick. Jose Bosingwa restarts play with the free kick.
Sebastian Larsson takes a shot. Blocked by Ji-Sung Park.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.