QPR came from behind to win their final home match of the season as the club said farewell to Jamie Mackie and Nedum Onuoha.
Belgian youngster Ilias Chair netted midway through the second half – his first senior goal – and Matt Smith in injury time to give Rangers a deserved victory.
Bright Osayi-Samuel also scored his first QPR goal, hauling them level less than two minutes after Che Adams had opened the scoring.
The visitors went ahead on 27 minutes when Jacques Maghoma sent in a low cross from the left and Adams slotted home his eighth goal of the season.
But Maghoma was quickly given a taste of his own medicine, with Luke Freeman beating him on the flank to set up Rangers’ equaliser.
Chair directed Freeman’s right-wing cross back towards Osayi-Samuel, who scored from close range with the aid of a deflection off Blues defender Wesley Harding.
Freeman and a deflection were also involved in QPR’s second goal, scored on 70 minutes.
Again Freeman created space for himself on the left and crossed to Chair at the far post, where the midfielder’s shot went in off Blues defender Maxime Colin.
And Smith, on as a substitute, fired in off the post after being teed up by Ebere Eze’s header.
Birmingham keeper David Stockdale had kept Rangers at bay with a number of saves.
Stockdale saved from Ryan Manning, Eze and Freeman early on and denied Osayi-Samuel a second goal before the interval by tipping over the winger’s powerful shot.
His best stop came early in the second half when he did superbly to parry Jake Bidwell’s header from Freeman’s right-wing corner and an off-balance Darnell Furlong was unable to add the finishing touch from close range.
Stockdale also did well to push over a fierce strike from Freeman before Rangers finally grabbed the lead.
Stockdale later denied crowd favourite Mackie, while R’s keeper Joe Lumley prevented a Birmingham equaliser by getting down quickly to grab a shot from Jota.
Onuoha and Mackie were given rousing receptions by the home fans when they were brought on as second-half substitutes. Both players are leaving QPR when their contracts expire this summer.
The mood among Blues fans is much more sombre. Their team will go down if they lose at home to promotion-chasing Fulham next weekend and results elsewhere go against them.
This post was last modified on 28/04/2018