Kenneth Paal equalised five minutes into stoppage time to rescue a point for QPR as they drew 1-1 with fellow strugglers Huddersfield.
Jack Rudoni’s 86th-minute goal looked like leaving third-from-bottom Rangers six points adrift of the Terriers – the team immediately above them in the Sky Bet Championship table.
But Ilias Chair’s right-wing cross was kneed into the top corner of the net by left-back Paal in the final stages and helped avoid a potentially disastrous home defeat.
A win would have taken QPR out of the relegation zone, where they have been since September, and leapfrogged Huddersfield. The draw means the gap remains at three points.
Both sides struggled to create clearcut chances, particularly during a scrappy first half, although Chair and young striker Sinclair Armstrong looked a threat for Rangers.
Playmaker Chair saw a weak shot comfortably saved by goalkeeper Lee Nicholls and sent in a wickedly-delivered corner from the left, but no-one could add a decisive touch.
Armstrong, meanwhile, fired high and wide from an acute angle during a frustrating opening 45 minutes for the hosts.
At the other end, Rhys Healey headed over from Sorba Thomas’ free-kick and had a shot blocked by Jake Clarke-Salter following good work on the right by Rudoni.
QPR boss Marti Cifuentes will have hoped for an improvement after the interval, but it did not materialise.
Instead, Huddersfield looked the better side, enjoying the majority of possession and going close when Michal Helik headed just over from Thomas’ left-wing corner.
It prompted Cifuentes to make a double substitution, sending on Paul Smyth and Elijah Dixon-Bonner in place of Chris Willock and the ineffective Lyndon Dykes.
That did make a slight difference, with Smyth adding some energy in attack and Dixon-Bonner shooting wide from near the edge of the penalty area, before Jack Colback’s left-footed strike was caught by Nicholls.
However, that was as much as QPR could muster before Rudoni broke the deadlock.
Rangers, who have shown a tendency to concede goals from set-pieces, failed to properly clear a free-kick and Radinio Balker’s shot fell to Rudoni, who fired past keeper Asmir Begovic.
The last-gasp equaliser will be a huge relief for Cifuentes but the R’s remain in deep trouble and must now hope that the arrival of Swiss striker Michael Frey gives them the impetus up front they have lacked all season.
Frey, whose signing from Royal Antwerp was announced shortly before kick-off, scored 33 goals in 69 games for the Belgian club and Rangers desperately need him to produce that kind of form in England.