Birmingham 3 Rochdale 2
Birmingham survived nervy moments to come from behind and progress to the Carling Cup third round.
Birmingham survived nervy moments to come from behind and progress to the Carling Cup third round.
Gary Jones' goal for Rochdale had stunned St Andrew's to put the League One side ahead, before James McFadden's penalty drew the home side level.
Blues went on to strike again through David Murphy and a first goal for Matt Derbyshire, but a second from Jones ensured a tense finale.
The Rochdale striker had showed predatory instincts to open the scoring in the 26th minute, pouncing to finish after Scott Wiseman's effort had been parried by goalkeeper Maik Taylor.
But Blues, somewhat fortuitously, drew level from the penalty spot just two minutes later, which referee Mike Russell awarded for a dubious Marcus Holness foul on Derbyshire.
Up stepped McFadden to fire past goalkeeper Josh Lillis.
Three minutes after half-time Blues were ahead as defenders combined with Murphy, making his first appearance in 16 months, volleying home Roger Johnson's knock-down.
The third goal on 53 minutes was another cruel blow for Rochdale as Derbyshire, on his first start for the club, saw his shot spilled by Lillis and deemed to have crossed the line before the defence could clear it from their goalmouth.
But the spirited League One visitors fought to the death with a second from 33-year-old Jones, who slotted the ball in from Chris O'Grady's low cross with 14 minutes to go.