Local hero Shola Ameobi came off the bench to hand Newcastle a welcome three points and manager Alan Pardew the perfect Christmas present.
- Related Content
The 31-year-old striker produced an assured 81st-minute finish just as it looked as though the Magpies would have to settle for a draw in a game they knew was a must-win affair.
It was no more than they deserved on a day when they dominated throughout, but too often lacked the guile of injured duo Yohan Cabaye and Hatem Ben Arfa.
However, thanks to Ameobi, they got there in the end to claim just their second Barclays Premier League victory in eight attempts and condemn Harry Redknapp to his first defeat as Rangers boss.
The match kicked off on a pitch soaked by persistent rain, which showed little sign of abating, but with referee Kevin Friend having had two looks at it and seeing no reason not to start.
As the first half unfolded, there was clearly surface water, but it did not affect the roll of the ball unduly as the Magpies set about the task of winning a game they simply could not afford to lose or even, in the eyes of their manager, draw.
Roared on by a crowd of 50,180, the majority of whom were well aware of what was at stake, they set about their task with relish and dominated the opening 45 minutes.
However, the lack of a final ball cost them dearly as they were simply unable to convert a wealth of possession into goals.
Left winger Jonas Gutierrez was particularly guilty of failing to produce a telling cross on the numerous occasions on which he took aim, while overlapping full-back Davide Santon got into some promising positions down the same flank, but repeatedly picked out a hooped, rather than a striped, shirt.
In the event, Rob Green was as under-employed as Tim Krul despite finding his penalty area repeatedly besieged by the Magpies.
The game started promisingly for the home side with striker Papiss Cisse heading into the side-netting from Gutierrez's cross, although he did so having nudged defender Fabio da Silva in the back first and it would not have counted anyway.
Stephane Mbia was in the right place at the right time to clear Mike Williamson's goal-bound header from a Vurnon Anita corner three minutes later, although the Dutchman's ball was the sole cross of note he or any of his team-mates delivered before the break.
Indeed, Green's only real save came with 31 minutes played when he plucked Cheick Tiote's shot out of the air, although there was more than a hint of a cross about the Ivorian's attempt.
At the other end, Krul was effectively a spectator and he was called upon for the first time to field Alejandro Faurlin's corner with 11 minutes of the half remaining before then collecting Djibril Cisse's 43rd-minute scuffed volley.
But in the meantime, Anton Ferdinand had blocked a well-struck effort from leading scorer Demba Ba, who later wasted two free-kicks in quick succession, blasting both high over the bar, much to the frustration of the home fans.
QPR produced more inside the opening three minutes of the second half than they had in the entire first with Cisse forcing Krul to turn his low drive around the post and Mbia heading the resulting corner high over.
But as the half settled down, the visitors packed men behind the ball to frustrate their hosts, and were content to try to hit them on the break, a ploy which prompted the introduction of Shaun Wright-Phillips as a 56th-minute replacement for Esteban Granero.
Pardew made a double change on the hour, replacing Gutierrez and, to the clear disapproval of the home fans, Papiss Cisse, with Gabriel Obertan and Ameobi in the search for a breakthrough.
But it was Anita who very nearly made the difference with a 63rd-minute free-kick which Green could only palm away, mercifully for him into a sea of blue, rather than black and white, shirts.
The Rangers goalkeeper had to scramble away Anita's near-post corner two minutes later and Ba saw a shot on the turn deflected for a corner before Ameobi completely mistimed a header as the Magpies made another concerted push.
Ba could not generate enough pace to trouble Green with his 73rd-minute header from Obertan's cross, but when Ameobi's big moment arrived, he was not found wanting.
Sylvain Marveaux slipped the ball into his path on the right side of the penalty area and he steadied himself before curling a left-foot shot across Green and into the bottom corner.
Substitute Marveaux might have added a second two minutes later after being denied by Green, but there was no way back for Redknapp's men.
Tiote will miss the Boxing Day trip to Manchester United after picking up his fifth booking of the season but even that could not take the smile from Pardew's face.