Relegation is still a real possibility for Newcastle United going into the Premier League's final day following a 2-1 loss at QPR.
Newcastle United missed the chance to secure Premier League survival as Leroy Fer's magnificent winner gave relegated QPR a 2-1 victory at Loftus Road.
John Carver's men had ended a run of eight straight defeats with a 1-1 draw against West Brom last week and they opened the scoring on Saturday through Emmanuel Riviere's 24th-minute strike.
Riviere's first Premier League goal - which finally came after 18 hours and four minutes in a black and white shirt - could have been enough to see Newcastle ensure safety due to Hull City's 2-0 defeat at Tottenham.
But QPR - which saw goalkeeper Robert Green forced off with a head injury sustained in a collision with teammate Joey Barton - stormed back in the second half to claim a first home win of 2015.
Midfielder Matt Philips leveled in the 54th minute with a close-range header before Fer's spectacular winner made sure of the points.
Fer took advantage of Newcastle's carelessness in possession with a fierce long-ranger that flew beyond Tim Krul, meaning that the Tyneside club will go into its final-day meeting with West Ham just two points clear of third-bottom Hull, which finishes the season against Manchester United.
Riviere broke his duck with the first real clear-cut chance. The former Monaco man found the net with a scrappy finish that deflected off his left leg and beyond Green after sloppy defending from QPR had allowed him to latch on to a seemingly innocuous long ball forward from Krul.
Newcastle naturally grew in confidence following the opener and went close to adding a second when Ryan Taylor curled a free kick narrowly wide of the left-hand post.
There were worrying moments for QPR in the 31st minute when Green was caught in the head by the knee of teammate Barton as the midfielder came back to help clear the danger from a promising Newcastle attack. Green was able to walk off the pitch but was replaced by Alex McCarthy.
The substitute was called into action to prevent Newcastle from scoring again, getting down low to his right to keep out Fabricio Coloccini's diving header at the far post.
QPR boss Chris Ramsey made his final two changes at halftime by throwing on Reece Grego-Cox and Yun Suk-young in place of Steven Caulker and Junior Hoilett.
The hosts almost leveled two minutes after the restart when Phillips' effort was deflected wide by Jonas Gutierrez after good work down the right from Charlie Austin. Austin himself then lashed a shot off target from close range following more poor defending.
QPR finally got the goal its early second-half play deserved when Phillips rose highest to convert from Austin's excellent far-post cross.
And the turnaround was the completed in stunning fashion seven minutes later when Fer capitalized on a poor Krul clearance to find the top corner with a rasping drive from 30 yards.
Phillips wasted a golden chance for a third by blazing a shot over with the goal at his mercy, but it mattered little as QPR stood firm to set up a nervous final day for Newcastle.