Carling Cup - Round-up: Blues break brave Bees
Birmingham needed a last-minute equaliser and penalties to find a way past a determined Brentford in the Carling Cup fourth round.
Brentford were the match of their more illustrious opponents for most of the contest and took the lead courtesy of a crisp half-volley from Sam Wood midway through the second half.
Kevin Phillips scrambled home a goal for the hosts in stoppage time to keep Birmingham alive.
In extra time the Premier League side were far stronger but could not break through for a winner and the score stayed at 1-1.
Craig Woodman missed the decisive spot kick to send the Blues through 4-3 on penalties.
There were no such dramas for West Bromwich Albion, who turned in a confident display to coast past Sven Goran Eriksson's Leicester City 4-1 at the Walkers Stadium.
Simon Cox opened the scoring against the run of play, but Leicester levelled in the second half through a Nicky Shorey own goal.
Moments later, however, they surrendered the lead once more thanks of a gaffe from Conrad Logan in goal to hand Somen Tchyoi a tap-in, and late strikes from Steven Reid and Cox settled the tie.
Wigan weathered a first-half storm from Swansea to book their place in the next round with a 2-0 win at the DW Stadium.
Swansea, previously managed by Wigan boss Roberto Martinez, were an attacking threat throughout the first period, but could not take their opportunities to grab a lead.
And the Premier League side seized the initiative in the second half through Mauro Boselli's first goal for the club.
The Latics added a second at the death when Charles N'Zogbia won a penalty and Ben Watson tucked the ball confidently past Yves Ma-Kalambay.
They are joined in the quarter-finals by Ipswich, who had to come back from a goal down at home to Northampton to secure a 3-1 victory.
In an open first half the Cobblers, who beat Liverpool in the previous round, took the lead through Liam Davis' shot from distance.
But Carlos Edwards finished coolly to level, and Damien Delaney popped home a second just before the interval.
The second half was a quieter affair, but Tamas Priskin settled any nerves for the home side with a close-range header in the dying minutes.