Djibril Cisse scored the only and defining goal of the game against Stoke to give QPR's hopes of staying in the Premier League a massive boost.
The R's striker was on hand at the far post to sweep home Anton Ferdinand's header with his 89th minute strike after it looked like they had run out of steam after banging down the door for most of the game.
A goalless draw would have led to almost certain relegation but the win ensures their fate is in their own heads in their final game against Manchester City.
Thanks to West Brom's late comeback to draw 2-2 at Bolton, QPR are now two points above the relegation zone ahead of next weekend's season finale at the Etihad Stadium.
A draw at City will be enough to see Rangers survive, although even if they fail to achieve such a difficult task, Bolton will have to win at Stoke to stay up.
Rangers fans swamped the pitch after the game in celebration at knowing their team are nearer to survival, but for most of the 90 minutes they barracked their team, who were pitiful performers.
There was no spark in midfield, little threat up front and there were also shaky moments at the back. And all this coming against a Potters team whose season is 55 matches and 10 months old.
Yet, it did not matter in the end for the fans and a jubilant Tony Fernandes thanks to Cisse, who stole in at the back post to convert Anton Ferdinand's flick-on and secure the three points.
Stoke looked the stronger side early on. Despite hitting out at manager Tony Pulis in midweek, Cameron Jerome started in a Stoke team that contained four strikers.
The former Cardiff striker spectacularly failed to reward his manager early on, however, when he latched on to Peter Crouch's knock-down to volley over from 10 yards.
Adel Taarabt proved to be QPR's most lively performer. The Moroccan dazzled the Potters defence with his trickery and also stung Thomas Sorensen's palms with a powerful 25-yard free-kick.
Crouch got on the end of Rory Delap's long throw but Rangers' defence scrambled clear.
The home crowd urged their team on after news of Martin Petrov's opener for Bolton filtered through to Loftus Road, but they failed to respond.
The scrappy play from both teams continued and Barton's weak curler was the only other effort of note inside the first 35 minutes.
Bobby Zamora dispossessed Upson, charged down the right and crossed perfectly for Barton but he nodded straight at Sorensen.
Stoke almost grabbed the lead on two occasions just after the break. Crouch miscued a free header and Ricardo Fuller curled a wicked shot that flew just wide.
The home fans demanded Cisse's introduction and it came after 55 minutes at the expense of Akos Buzsaky.
There was little urgency about Rangers despite the fact they knew they had to win and the home crowd started to get nervous.
Barton threw himself into the path of Huth's volley as Stoke continued to threaten, but QPR earned a good opportunity in the 68th minute when Upson toppled Zamora on the edge of the box.
Taye Taiwo could only drive into the wall, however - his tame shot summing up the hosts' limp performance.
At the other end Paddy Kenny punched the ball away to deny Fuller a free header from eight yards.
The away fans sang "2-0 Bolton, 2-0 Bolton" as it emerged the Trotters had added a second and
QPR almost responded to the taunt by taking the lead.
Taiwo crossed brilliantly for Cisse, but Sorensen scrambled across his goal-line to deny the Frenchman.
Hughes threw on Jay Bothroyd and Shaun Wright-Phillips at the death to add some extra impetus and the move worked.
Wright-Phillips' shot deflected wide, leading to a QPR corner. Taarabt's cross was nodded on by Ferdinand and up popped Cisse to stab home from close range to send the home crowd into ecstasy.
Crouch missed a chance to grab an equaliser in the four minutes of added time as QPR held on for a valuable win which was followed by a huge pitch invasion.
News of two late goals at Bolton lifted spirits further and the players came back on to the pitch after the final whistle to salute their jubilant and relieved support.
|Queens Park Rangers||Team Statistics||Stoke City|
|0||1st Half Goals||0|
|6||Shots on Target||0|
|8||Shots off Target||7|
|60.3||1st Half Poss.||39.7|
|50.3||2nd Half Poss.||49.7|