Ivan Klasnic struck four minutes from time to earn Bolton a priceless win over fellow Barclays Premier League strugglers QPR but it was a controversial result after Clint Hill was denied what appeared a clear goal for the visitors in the first half.
The defender's header had indisputably crossed the line before it was clawed out by goalkeeper Adam Bogdan in the 19th minute but referee Martin Atkinson waved play on and Bolton took the lead eight minutes before the break through Darren Pratley.
Djibril Cisse equalised three minutes after half-time but substitute Klasnic had the final say to lift Bolton out of the relegation zone and ensure Rangers will end the day inside it.
Both sides went into the match in poor form, with QPR - who had Cisse and Samba Diakite back from suspension - looking for a first win in seven while Bolton had lost their last four in the league.
It was all a far cry from the opening day of the season, when a 4-0 victory over Rangers briefly put the Trotters on top of the table.
This really was a must-win game for Owen Coyle's side and they began with purpose but the final ball was lacking in quality.
The only time they really threatened a goal in the early stages was in the 14th minute when David Wheater got his head to Ryo Miyaichi's corner but Bobby Zamora cleared off the line.
QPR had hardly been in the Bolton half but a quick break ended with Shaun Wright-Phillips setting up Joey Barton, and the hosts were relieved to see the ball fly wide of the post off Sam Ricketts.
Suddenly the visitors were looking dangerous and Zamora cracked a volley from a tight angle against Bogdan's bar, and they should have been ahead in the 19th minute when Hill met a Barton corner four yards out.
The ball was well over the line before Bogdan pushed it against the bar and out, but referee Atkinson waved play on to the disbelief of the Rangers players.
It was a huge decision in a huge game, although perhaps the end result was right given replays showed it should not have been a corner in the first place as the ball went out off Cisse.
The Football Association subsequently issued a statement reiterating their "strong desire to see goal-line technology introduced as soon as possible".
Bolton regained a measure of control and Ngog wanted a penalty when he tumbled under pressure from Anton Ferdinand but there did not appear to be much contact.
However, the Trotters were celebrating in the 37th minute when defender Tim Ream produced a perfect cross for an unmarked Pratley to head in his second goal for the club and first in the Premier League.
Wright-Phillips had the chance to level matters almost immediately but curled a shot high and wide before Nedum Onuoha's effort was blocked by the impressive Bogdan.
It took QPR only three minutes of the second half to level, and again there were question marks as Cisse had all the time in the world to collect Wright-Phillips' deflected pass and poke the ball past Bogdan for his second Rangers goal.
Bolton's defence were appealing vociferously for offside, and it did look like the striker may have been marginally ahead of Wheater when the ball was played.
Cisse then forced Bogdan into another save, although his weak shot did not really test the Hungarian, while at the other end Ricketts curled a shot just over the bar.
Akos Buzsaky and Jamie Mackie came on for Rangers with fans' favourite Klasnic entering the fray for Bolton, and Mackie was straight into the action but the home goal stayed intact thanks to some heroic defending.
The visitors looked the more likely winners but with four minutes left Ryo Miyaichi played in Klasnic and he slotted his shot past Paddy Kenny to secure three vital points.