Birmingham moved through to the last 16 of the FA Cup for the first time in six years courtesy of an early goal from Bryan Hughes.
But they were given the fright of their lives by Division One basement club Wimbledon in a fourth-round tie at St Andrews.
Only the woodwork denied them a replay when Jamie Mackie's first-half effort hit the post.
Birmingham had welcomed back record signing David Dunn after he missed the goalless draw at Chelsea with a hamstring injury. He came into the side in place
of Stephen Clemence.
Full-back Jamie Clapham was also fit after a hamstring injury but he had to be content with a place on the substitutes' bench - as was leading scorer Mikael
Forssell who was unavailable for the clash at Stamford Bridge.
Wimbledon were still trying to come to terms with the midweek sale of Nigel Reo-Coker and Adam Nowland to West Ham but veteran Dean Holdsworth was in their attack.
However, Hughes gave Birmingham a fourth-minute lead. Dunn played a through-ball into the path of the midfielder who beat the offside trap before slipping his shot over the advancing Wimbledon keeper Steve Banks.
The visitors had made a bright start and City keeper Maik Taylor had failed to hold on to a low shot from the lively Joel McAnuff.
Taylor then had to come off his line quickly to block an effort from Mackie at the expense of a corner.
Banks had problems dealing with a cross from Damien Johnson at full stretch but no-one was on hand to capitalise.
Wimbledon took the game to the home side after their early setback and Taylor just managed to take the ball off the toes of Mikele Leigertwood after he had
made a determined run at the heart of the Blues defence.
The woodwork then denied Mackie an equaliser after he had been sent clear of the Birmingham defence by Dean Lewington. His low effort hit the post and a
relieved Taylor was grateful to grab hold of the rebound.
City defender Darren Purse was the first player to be yellow-carded by referee Uriah Rennie after a challenge on Ben Harding.
Dean Lewington took the resulting free-kick and Taylor turned his dipping effort around the post.
Birmingham were making little impression in attack after their bright start although Banks was forced to turn over a long-range deflected effort from Dunn.
Clinton Morrison started to trouble Wimbledon and had a series of opportunities to double his side's lead. First he had a close-range shot blocked and then robbed Leigertwood but his eventual shot was turned around the post by
Banks.
The Republic of Ireland striker should then have done better from close range but he scooped his shot over the crossbar after Stern John had headed their corner from Dunn into the danger zone.
But Wimbledon still posed a threat when they ventured forward and Wade Small was only inches off target with a shot across the face of goal.
Dunn then chose the spectacular route and his dipping volley was only just off target.
Birmingham began the second half positively and a pass from Jeff Kenna found Morrison inside the Dons penalty area, but the striker was over-elaborate and
the ball ran out for a goalkick.
Wimbledon were certainly playing with great determination and spirit and looked capable of snatching an equaliser.
Birmingham had appeals for a penalty rejected after a challenge on Hughes by Darlington. Hughes then came close to doubling the home side's lead with a
20-yard shot which was only just off target.
Hughes was an influential figure for the home side who were now starting to play the ball around on the floor more than they did in the opening 45 minutes.
A telling pass from Hughes found John in space on the edge of the Wimbledon penalty area and his first-time volley was only a yard off target.
Banks clung on to a low shot from Morrison while at the other end Taylor dealt with a similar effort from Small.
Birmingham manager Steve Bruce made his first substitution and brought on Forssell in place of Dunn after 65 minutes. He was soon in the thick of the action with a low shot which fizzed past the post.
But Wimbledon were still battling away and Hughes was relieved when he deflected the ball past his own post following a low shot from McAnuff.
The home side were well below their best but Banks had to keep out a shot from Johnson with the keeper also turning away a shot from Morrison as Blues booked
their place in round four.
Teams
Birmingham: Taylor, Tebily, Cunningham, Purse, Kenna, Johnson,
Savage, Hughes, Dunn (Forssell 65), John (Clapham 68), Morrison.
Subs Not Used: Bennett, Kirovski, Carter.
Booked: Purse.
Goals: Hughes 4.
Wimbledon: Banks, Darlington, Gier, Leigertwood, Lewington,
McAnuff, Harding (Hawkins 87), Chorley, Small, Mackie,
Holdsworth (Gray 87).
Subs Not Used: Herzig, Kamara, Worgan.
Att: 22,159
Ref: U Rennie (S Yorkshire).