QPR missed a glorious chance to pull out of the bottom three after conceding two late goals at Hillsborough.
Ilias Chair’s deflected effort seven minutes before half-time looked to be enough to give Rangers a fourth win in five games, but goals inside the final 10 minutes from Bailey Cadamarteri and Anthony Musaba handed the Owls a dramatic victory.
Rangers boss Marti Cifuentes made five changes to the side that drew with Plymouth and were comfortable for much of the game until Cadamarteri turned in Djeidi Gassama’s low cross.
That goal came shortly after Sam Field should have won the game for Rangers when he was teed up in the box by Chris Willock but could only shoot straight at Cameron Dawson.
Musaba won the game in the 95th minute on when he turned in from close range after a Barry Bannan cross was headed on to the post by Marvin Johnson after Rangers had failed to clear their ball.
The result leaves Rangers in the relegation zone after Huddersfield grabbed a late draw at Millwall.
QPR:Begovic, Cannon (Willock 45), Clarke-Salter, Paal, Field, Dixon-Bonner, Dozzell (Cook 85), Smyth (Kakay 75), Chair, Armstrong (Dykes 45).
Subs not used: Archer, Richards, Duke-McKenna, Drewe, Pedder.