Match ends, Birmingham City 2, Brentford 1.
Birmingham City beat Brentford to claim their third straight home win at St Andrew's and climb to within two points of the Championship play-off places.
After Jon Toral set up Jacques Maghoma to burst into the area and fire a 55th-minute opener, Brentford then levelled.
Philip Hofmann followed up after Blues keeper Tomasz Kuszczak failed to hold onto Alan Judge's long-range effort.
But midfielder Maikel Kieftenbeld struck on 89 minutes from close range, turning in James Vaughan's cross.
It was the Dutchman's first goal for Blues since his summer arrival from FC Groningen, to add to fellow midfielder Maghoma's second goal in successive matches - and his fifth of the season.
Brentford had the majority of the play but ended up suffering only their second defeat in eight games since Dean Smith's appointment as boss on 30 November.
Hofmann might have had another when he side-footed over the bar from Maxime Colin's cross shortly after his 77th-minute equaliser.
Brentford top scorer Judge also ballooned over when put through with only Kuszczak to beat. And, in added time, Kuszczak did well to punch away Judge's dangerous near-post free-kick.
That allowed Gary Rowett's Blues to leapfrog the Londoners into eighth, back to within two points of the play-off places.
Could Blues lose Demarai Gray?
Birmingham City's highly-rated teenage winger Demarai Gray was conspicuous by his absence at St Andrew's.
Gray, the subject of several offers leading up to £5m from Bournemouth a year ago, is reportedly in talks with Premier League high fliers Leicester City pending a possible January transfer window sale.
Blues were further hampered by the half-time loss of top scorer Clayton Donaldson against his former club.
He suffered a back injury after falling heavily in an aerial duel and, after having initially tried to stay on, his movement was restricted and he was replaced at the break by on-loan James Vaughan.
Birmingham manager Gary Rowett:
"We have won three games, drawn two and lost one in the last six games and are now only three points behind one of the really big teams in our division.
"We are massively punching above our weight but we now have the opportunity to strengthen our attacking options as we have not scored enough goals recently.
"Without coming under too much pressure we showed great resolve to go for the winning goal after Brentford obtained their equaliser."
Brentford boss Dean Smith:
"It was a compliment to us how deep Birmingham played. They certainly frustrated their own supporters in the first half and they probably scored against the run of play on a counter attack.
"Birmingham were happy to play for a point after our equaliser - but that is not our style.
"They were lucky to have 11 players on the pitch in the second half after Toral's tackle on Jake Bidwell. For me it was a red card as he was certainly out of control when he made that tackle."
- 3GroundsBooked at 84mins
- 6KieftenbeldBooked at 11mins
- 20ToralBooked at 45minsSubstituted forShinnieat 83'minutes
- 19MaghomaSubstituted forDavisat 75'minutes
- 9DonaldsonSubstituted forVaughanat 45'minutesBooked at 63mins
- 6DeanBooked at 17mins
- 26TarkowskiBooked at 45mins
- 47CanosSubstituted forGogiaat 80'minutes
- 19SwiftSubstituted forMcEachranat 70'minutes
- 21VibeSubstituted forHofmannat 64'minutes
- Graham Scott
- Shots on Target
Second Half ends, Birmingham City 2, Brentford 1.
Toumani Diagouraga (Brentford) wins a free kick in the defensive half.
Foul by David Davis (Birmingham City).
Jake Bidwell (Brentford) wins a free kick on the left wing.
Foul by David Davis (Birmingham City).
Goal! Birmingham City 2, Brentford 1. Maikel Kieftenbeld (Birmingham City) right footed shot from the right side of the six yard box to the centre of the goal. Assisted by James Vaughan.
Attempt missed. James Vaughan (Birmingham City) left footed shot from the left side of the box misses to the right. Assisted by Andrew Shinnie.
Foul by Harlee Dean (Brentford).
Jonathan Grounds (Birmingham City) wins a free kick in the defensive half.
Jonathan Grounds (Birmingham City) is shown the yellow card for a bad foul.
Akaki Gogia (Brentford) wins a free kick in the defensive half.
Foul by Jonathan Grounds (Birmingham City).
Hand ball by Alan Judge (Brentford).
Substitution, Birmingham City. Andrew Shinnie replaces Jon-Miquel Toral because of an injury.
Delay over. They are ready to continue.
Delay in match Jon-Miquel Toral (Birmingham City) because of an injury.
Maxime Colin (Brentford) wins a free kick in the defensive half.
Foul by Jon-Miquel Toral (Birmingham City).
Attempt saved. Akaki Gogia (Brentford) right footed shot from the right side of the box is saved in the bottom right corner. Assisted by Alan Judge with a cross.