Match ends, Birmingham City 2, Queens Park Rangers 1.
Birmingham City scored twice in the last 10 minutes to earn their first home win in 13 games and stun Queens Park Rangers.
Charlie Austin looked to have set QPR on their way with his close-range volley a minute before the break.
But Blues, who had not won at home since 28 October, levelled on 82 minutes when Marc Roberts crossed for Kristian Pedersen to flick home a header from eight yards,
Just three minutes later, Croatian midfielder Alen Halilovic then won it for Blues with a superb left-footed curler from 20 yards - his first goal for the club.
It was also a fitting way to mark the 10-year anniversary of one of the happiest days in Blues' history, their 2-1 Wembley League Cup final win over Arsenal.
QPR were unbeaten in their previous seven away league matches, their best run on the road in over 10 years - and they looked set to add to that when they took the lead on the stroke of half-time.
Austin, who came off the bench to score twice and win the game here for West Brom against Blues last season, again showed his liking for this corner of Birmingham.
The 31-year-old striker began the move with a first-time ball out to the wing where Todd Kane floated a neat right-foot cross back in for Austin to volley in at the far post - his fourth goal in nine games since returning on loan to QPR in January.
QPR should immediately have made it 2-0 when another former Baggies man Chris Willock squared for Stefan Johansen, but the on-loan Fulham midfielder - who also had a spell at The Hawthorns - somehow ballooned over from six yards out.
They had the better chances after the break too, but a three-man substitution from Blues boss Aitor Karanka sparked a turnaround, as the double introduction of Halilovic and Jonathan Leko was followed by targetman Lukas Jutkiewicz.
Full-back Pedersen's well-taken header gave Blues hope before November free agent signing Halilovic, dubbed the 'Croatian Messi' in his youth, sank the Hoops with a goal the Argentine would have been proud of.
That gave Blues a second goal in a home game for the first time since their last home win, when they beat Huddersfield Town 2-1 on 28 October - and for only the second time since the 3-3 draw with Hull City last June.
City, who are still 21st but now five points clear of trouble, face the return game with Huddersfield on Tuesday night, while QPR, six points better off in 17th, host Barnsley the following evening.
Birmingham City boss Aitor Karanka told BBC Radio WM:
"I am especially pleased for the players. It was so important to win at home. It looked like another bad day at the office and it has been unfair on them, but they believed, they worked hard and they deserved this.
"Alen Halilovic was really good. He's a top player. He was the Croatian Messi with the ball. But quality in this league is not enough.
"Everyone knows his quality. He doesn't need time. He just needs to work. If he does not work hard enough, he won't be the Croatian Messi in this league.
"We had a meeting this week. I told him if he had not played for his last clubs he could not blame his managers, he had to blame himself. He told me I was right and he showed me today he can do it."
QPR manager Mark Warburton:
"I felt the pitch was really poor. It was tough for both teams, hence you didn't see a nice game of football. You saw balls being lumped forward because it was so hard for players to make good decisions.
"We had the one bit of quality in the first half when after a great ball in, Charlie put in a great finish. We were in control then and what we had to do was do the ugly side in the second half better than we did.
"Stefan Johansen had a huge chance to make it 2-0. That was the deciding moment. But he looked down at the pitch. It bobbled over when he would finish those nine times out of 10."
- 15Clarke-SalterSubstituted forRobertsat 63'minutesBooked at 90mins
- 3PedersenBooked at 51mins
- 17SánchezSubstituted forValeryat 90+1'minutes
- 20GardnerSubstituted forHalilovicat 63'minutesBooked at 86mins
- 11BelaSubstituted forLekoat 63'minutes
- 9HoganSubstituted forJutkiewiczat 71'minutes
- 14JohansenSubstituted forAdomahat 87'minutes
- 21WillockBooked at 13minsSubstituted forFieldat 56'minutes
- 7BonneBooked at 73minsSubstituted forKelmanat 87'minutes
- 45AustinSubstituted forDykesat 56'minutes
- David Webb
- Shots on Target
Second Half ends, Birmingham City 2, Queens Park Rangers 1.
Marc Roberts (Birmingham City) is shown the yellow card.
Hand ball by Albert Adomah (Queens Park Rangers).
Attempt missed. Geoff Cameron (Queens Park Rangers) header from the centre of the box is close, but misses to the right. Assisted by Albert Adomah following a set piece situation.
Foul by Jonathan Leko (Birmingham City).
Robert Dickie (Queens Park Rangers) wins a free kick in the attacking half.
Substitution, Birmingham City. Yan Valery replaces Iván Sánchez.
Foul by Alen Halilovic (Birmingham City).
Sam Field (Queens Park Rangers) wins a free kick in the defensive half.
Substitution, Queens Park Rangers. Albert Adomah replaces Stefan Johansen.
Substitution, Queens Park Rangers. Charlie Kelman replaces Macauley Bonne.
Alen Halilovic (Birmingham City) is shown the yellow card for excessive celebration.
Goal! Birmingham City 2, Queens Park Rangers 1. Alen Halilovic (Birmingham City) left footed shot from outside the box to the bottom left corner. Assisted by Iván Sánchez.
Attempt missed. Harlee Dean (Birmingham City) header from the centre of the box misses to the right. Assisted by Marc Roberts.
Goal! Birmingham City 1, Queens Park Rangers 1. Kristian Pedersen (Birmingham City) header from the centre of the box to the bottom right corner. Assisted by Marc Roberts with a cross.
Rekeem Harper (Birmingham City) wins a free kick in the defensive half.
Foul by Macauley Bonne (Queens Park Rangers).
Corner, Queens Park Rangers. Conceded by Kristian Pedersen.
Corner, Queens Park Rangers. Conceded by Harlee Dean.