Lee Chung-Yong struck the winner as Bolton overcame a battling Birmingham to reach the FA Cup semi-finals.
Johan Elmander powered in a shot to put the visitors ahead before Cameron Jerome equalised with a half-volley.
Kevin Davies restored Bolton's lead when he struck from the spot after he was fouled by Curtis Davies.
A dipping shot from Kevin Phillips, who also hit the post, levelled matters before Lee nodded in from close range to settle a pulsating game.
The victory puts the Trotters in the last four of the FA Cup for the first time in 11 years but they were pushed all the way by Birmingham, despite the home side's woes.
There had been a sense of vulnerability about Blues because manager Alex McLeish was without nine key players through injury and therefore fielded a side that had a walking wounded feel to it.
The Midlands outfit also had the spectre of a Premier League relegation fight hanging over them as they faced a Bolton team who, with four wins from their last five outings, seemed ready to compound their misery.
However, Birmingham produced the tenacity and tigerish attitude that typified their Carling Cup final success over Arsenal and put up a brave fight before eventually falling to a valiant defeat.
The home side suffered an early setback when ex-Blues midfielder Fabrice Muamba's header was delicately glanced on by Ivan Klasnic and Elmander finished in emphatic fashion after 21 minutes.
Birmingham's problems were exacerbated when centre-back Martin Jiranek and midfielder Barry Ferguson both had to go off injured before the half-hour mark and were replaced by Liam Ridgwell and 17-year-old Nathan Redmond.
However, rather than fold, McLeish's side fought hard and Jerome headed on a goal-kick that Bolton centre-back David Wheater inadvertently cleared back to him.
The Blues striker made the most of his fortune as he controlled the ball and his sweetly struck half-volley powered into the bottom corner as the visitors conceded the first goal of their FA Cup campaign this season.
While those two moments stood out in a first half of route one football, the second period was more about the frantic nature of an FA Cup tie.
Birmingham fans cried out for a penalty when Jerome went over after a challenge from Jussi Jaaskelainen but the Bolton keeper got a touch to the ball when coming out of his goal to foil the forward.
Lee was introduced after 61 minutes and was immediately in the thick of the action as he cleared off the line when a Sebastian Larsson corner came off the thigh of Blues defender David Murphy.
Bolton went up the other end and won a penalty when home centre-back Curtis Davies fouled Kevin Davies, with the latter picking himself up to convincingly convert it after 66 minutes.
If the visitors thought that might break Birmingham's spirit, they were wrong.
Phillips, 37, was surrounded by defenders but the wily forward still managed to produce an angled effort that agonisingly came back off the far post.
But the veteran showed his goalscoring prowess when he struck a ball at the top of its bounce to send a dipping 20-yard shot over Jaaskelainen.
A replay looked on the cards, only for Kevin Davies to head across goal and Lee to nod in from six yards for a Bolton win in injury time.
Birmingham manager Alex McLeish: "Our lads, despite the problems we had with injuries, put in a magnificent effort.
"You couldn't ask for more in terms of commitment and effort.
"But we were a bit sloppy with the goals. When your back four changes, they may not gel and it was evident with the first and third goals.
"But overall the performance of the team was a plus."
Bolton boss Owen Coyle: "I felt we deserved to win. Birmingham have won the Carling Cup and you don't win that by accident.
"You win it because you have quality and tremendous spirit and you've seen that from them again today.
"But I know what I have in my group. I know the quality of player but equally I know the attitude they have.
"They picked themselves up twice from losing the lead. I said to the players, 'don't let the opportunity pass you by' and they responded excellently.
"Whatever the draw, we will be ready to go and try and win that game when it comes about."
90:00+5:55 The referee blows for the end of the match.
90:00+5:46 The ball is crossed by Sebastian Larsson, Gary Cahill makes a clearance.
90:00+5:27 Ben Foster fouled by Matthew Taylor, the ref awards a free kick. Ben Foster takes the free kick.
89:53 Substitution Matthew Taylor is brought on as a substitute for Martin Petrov.
89:07 The assist for the goal came from Kevin Davies.
89:07 GOAL - Chung-Yong Lee:Birmingham 2 - 3 Bolton Chung-Yong Lee scores a headed goal from inside the six-yard box. Birmingham 2-3 Bolton.
88:03 Mark Davies fouled by Kevin Phillips, the ref awards a free kick. David Wheater produces a shot on goal direct from the free
87:16 The ball is delivered by Stuart Holden, Stuart Parnaby manages to make a clearance. Martin Petrov produces a cross, Liam Ridgewell
makes a clearance.
85:11 Shot on goal by Kevin Phillips from long range goes harmlessly over the target.
82:17 Unfair challenge on Stuart Holden by Cameron Jerome results in a free kick. Jussi Jaaskelainen takes the direct free kick.
82:17 Substitution David Murphy goes off and Matt Derbyshire comes on.
81:37 The assistant referee flags for offside against Johan Elmander. Indirect free kick taken by Ben Foster.
80:48 Unfair challenge on Liam Ridgewell by Kevin Davies results in a free kick. Direct free kick taken by Ben Foster.
80:48 Booking Kevin Davies is shown a yellow card for unsporting behaviour.
79:24 Assist on the goal came from Nathan Redmond.
79:24 GOAL - Kevin Phillips:Birmingham 2 - 2 Bolton Kevin Phillips fires in a goal from outside the penalty area to the top left corner of the goal. Birmingham 2-2 Bolton.
76:58 Unfair challenge on Jussi Jaaskelainen by Curtis Davies results in a free kick. Jussi Jaaskelainen takes the free kick.
76:27 Liam Ridgewell fouled by Kevin Davies, the ref awards a free kick. Sebastian Larsson takes the free kick.
74:48 Stuart Holden sends in a cross, Stuart Parnaby manages to make a clearance. Johan Elmander has an effort at goal from 25 yards.
Ben Foster makes a save.
73:38 Free kick awarded for an unfair challenge on Jordon Mutch by Mark Davies. Ben Foster restarts play with the free kick.
72:02 Corner taken left-footed by Martin Petrov, clearance by Curtis Davies.
71:30 Jean Beausejour crosses the ball.
71:04 Stuart Holden produces a cross, Sebastian Larsson makes a clearance.
69:42 Kevin Phillips produces a right-footed shot from inside the box and strikes the post.
67:31 The ball is crossed by Chung-Yong Lee.
65:50 Penalty awarded for an unfair challenge on Kevin Davies by Curtis Davies.
65:50 GOAL - Kevin Davies:Birmingham 1 - 2 Bolton Penalty scored by Kevin Davies. Birmingham 1-2 Bolton.
63:51 The offside flag is raised against Kevin Davies. Ben Foster takes the free kick.
62:48 Nathan Redmond takes a shot. Blocked by Paul Robinson.
62:30 Mark Davies produces a cross, save by Ben Foster.
61:34 Corner taken by Sebastian Larsson from the left by-line, Chung-Yong Lee makes a clearance.
60:26 Free kick awarded for an unfair challenge on Kevin Phillips by Fabrice Muamba. Ben Foster takes the free kick.
60:26 Substitution Mark Davies joins the action as a substitute, replacing Fabrice Muamba.
60:26 Substitution Chung-Yong Lee joins the action as a substitute, replacing Ivan Klasnic.
57:46 Corner taken right-footed by Sebastian Larsson from the right by-line, Shot from 30 yards from Jordon Mutch. Blocked by David
57:19 Martin Petrov sends in a cross. Gretar Rafn Steinsson delivers the ball.
57:08 Kevin Phillips takes a shot. David Wheater gets a block in.
56:23 Ivan Klasnic concedes a free kick for a foul on Liam Ridgewell. Ben Foster restarts play with the free kick.
55:46 Kevin Davies concedes a free kick for a foul on Curtis Davies. Liam Ridgewell takes the free kick.
55:07 Nathan Redmond crosses the ball.
54:00 Kevin Phillips gives away a free kick for an unfair challenge on Fabrice Muamba. Free kick crossed right-footed by Stuart
Holden from right channel, clearance made by Jean Beausejour.
53:36 Foul by Sebastian Larsson on Stuart Holden, free kick awarded. Jussi Jaaskelainen takes the direct free kick.
52:32 Gary Cahill challenges Curtis Davies unfairly and gives away a free kick. Direct free kick taken by Ben Foster.
51:52 Unfair challenge on Gary Cahill by Cameron Jerome results in a free kick. Gretar Rafn Steinsson takes the direct free kick.
50:19 The referee blows for offside. Jussi Jaaskelainen takes the free kick.
50:05 Nathan Redmond produces a cross, Stuart Holden manages to make a clearance.
47:29 Stuart Holden takes a short corner. The ball is crossed by Martin Petrov, Jordon Mutch manages to make a clearance.
46:46 Stuart Holden delivers the ball, clearance by Jean Beausejour.
46:33 Martin Petrov crosses the ball, Curtis Davies makes a clearance.
45:38 Centre by Gretar Rafn Steinsson.
45:01 The second half kicks off.
45:00+2:09 The ref blows to signal half-time.
45:00+1:12 A cross is delivered by Nathan Redmond, save made by Jussi Jaaskelainen.
45:00+0:24 Centre by Stuart Holden, clearance made by Stuart Parnaby.
44:31 Kevin Davies challenges Liam Ridgewell unfairly and gives away a free kick. Free kick taken by Ben Foster.
44:18 David Murphy sends in a cross, clearance by Paul Robinson.
43:10 Jordon Mutch takes a weak shot and went wide of the right hand upright.
42:58 Jean Beausejour produces a cross, Gary Cahill manages to make a clearance.
40:48 Kevin Davies is flagged offside by the assistant referee. Ben Foster takes the free kick.
40:17 Kevin Phillips delivers the ball, save by Jussi Jaaskelainen.
37:49 GOAL - Cameron Jerome:Birmingham 1 - 1 Bolton Cameron Jerome fires in a goal from the edge of the penalty box to the bottom left corner of the goal. Birmingham 1-1 Bolton.
35:50 Unfair challenge on Curtis Davies by Kevin Davies results in a free kick. Ben Foster takes the direct free kick.
35:01 Unfair challenge on Stuart Holden by Sebastian Larsson results in a free kick. Free kick crossed by Stuart Holden, David Murphy
makes a clearance.
33:39 Gary Cahill gives away a free kick for an unfair challenge on Kevin Phillips. Direct free kick taken by Liam Ridgewell. The
referee blows for offside against Jean Beausejour. Jussi Jaaskelainen takes the free kick.
32:14 Inswinging corner taken by Sebastian Larsson, Paul Robinson makes a clearance.
32:07 The ball is delivered by David Murphy.
30:51 Free kick awarded for a foul by Cameron Jerome on David Wheater. Jussi Jaaskelainen restarts play with the free kick.
28:59 The ball is swung over by Jean Beausejour, Gary Cahill makes a clearance.
28:37 Substitution Barry Ferguson goes off and Nathan Redmond comes on.
28:16 The ball is delivered by Jean Beausejour.
27:44 Kevin Davies is penalised for handball and concedes a free kick. Free kick taken by Ben Foster.
27:01 Substitution Liam Ridgewell comes on in place of Martin Jiranek.
25:47 Kevin Davies challenges Martin Jiranek unfairly and gives away a free kick. Ben Foster takes the direct free kick.
25:15 Unfair challenge on David Wheater by Cameron Jerome results in a free kick. Jussi Jaaskelainen takes the free kick.
24:15 Ivan Klasnic concedes a free kick for a foul on Jordon Mutch. Sebastian Larsson crosses the ball in from the free kick, Kevin
Davies makes a clearance.
24:05 The ball is sent over by David Murphy, Gary Cahill makes a clearance.
22:54 Stuart Holden takes the inswinging corner, clearance by Kevin Phillips.
20:52 The assist for the goal came from Ivan Klasnic.
20:52 GOAL - Johan Elmander:Birmingham 0 - 1 Bolton Johan Elmander scores a goal from close in to the bottom left corner of the goal. Birmingham 0-1 Bolton.
20:18 Jean Beausejour gives away a free kick for an unfair challenge on Johan Elmander. Jussi Jaaskelainen takes the free kick.
19:40 Booking Gretar Rafn Steinsson receives a yellow card.
Correction - 19:26 Foul by Gretar Rafn Steinsson on Kevin Phillips, free kick awarded. Free kick taken by Ben Foster.
19:26 Gretar Rafn Steinsson gives away a for an unfair challenge on Kevin Phillips.
18:39 Paul Robinson fouled by Sebastian Larsson, the ref awards a free kick. Free kick taken by Paul Robinson.
17:07 Free kick awarded for an unfair challenge on Ivan Klasnic by Martin Jiranek. Free kick crossed by Stuart Holden, Jordon Mutch
makes a clearance.
16:48 The ball is delivered by Cameron Jerome.
15:43 Martin Petrov takes a shot. Blocked by Stuart Parnaby.
14:50 Paul Robinson gives away a free kick for an unfair challenge on Kevin Phillips. Barry Ferguson takes the direct free kick.
12:33 Foul by Johan Elmander on David Murphy, free kick awarded. Free kick taken by Ben Foster.
12:17 Sebastian Larsson delivers the ball, clearance made by Gretar Rafn Steinsson.
11:09 Free kick awarded for an unfair challenge on Jean Beausejour by Gretar Rafn Steinsson. Centre by Sebastian Larsson, Curtis
Davies takes a shot. Save made by Jussi Jaaskelainen.
8:10 Outswinging corner taken from the right by-line by Sebastian Larsson, Kevin Davies manages to make a clearance.
7:05 Inswinging corner taken left-footed by Martin Petrov played to the near post, Johan Elmander has a headed effort from close
range and clears the crossbar.
3:55 Effort from 20 yards by Fabrice Muamba. Ben Foster makes a comfortable save.
2:42 Corner crossed in by Sebastian Larsson, Gary Cahill manages to make a clearance.
1:57 Corner taken right-footed by Sebastian Larsson to the near post, clearance made by Stuart Holden.
1:38 Free kick awarded for a foul by Fabrice Muamba on Jordon Mutch. Ben Foster takes the direct free kick.
0:37 Effort on goal by Sebastian Larsson from outside the area goes harmlessly over the bar.
0:00 The referee starts the match.
Live text and data provided by The Press Association.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.