Brentford bowed out of the Carling Cup on penalties against Birmingham City after being two minutes from glory.
The Bees led thanks to to a Sam Wood goal before Kevin Phillips equalised two minutes into stoppage time with four added.
With no goals in extra time the game went to penalties and although Lee Bowyer blazed over the bar, the home side scored four of their spot kicks.
Kevin O'Connor, David Hunt and Lewis Grabban scored from the spot for Brentford but Michael Spillane hit the crossbar with his effort and Craig Woodman saw the final spot kick saved by Maik Taylor to send the home side through.
Birmingham could have taken the lead inside the first minute when an in-swinging Bowyer corner was cleared off the line by Leon Legge but that was by no means a pre-cursor to the evening's events.
Brentford were very competitive and were deservedly level at the break.
They then moved up a gear after the re-start and would have been worthy winners by the end of 90 minutes but for Phillips last gasp intervention.
The home side had the better chances in the first period, but not by much, and Brentford caused problems when they got Myles Weston into the game.
Wood had an early shot blocked for The Bees while at the other end Spillane made an important tackle when Phillips found space and Bowyer shot over.
Richard Lee saved well from Phillips and then held a dipping Garry O'Connor shot.
Brentford's best opening of the first half came when Weston created space and stood up a cross to the far post - Gary Alexander and Wood rose together and it appeared the Brentford striker headed against his team mate's back.
Lee made a superb save when Matt Derbyshire nodded back a Stuart Parnaby cross and O'Connor was set to pounce from eight yards - the Brentford goalkeeper managed to keep it out with a flailing arm.
At the other end, Taylor got down well to just keep out a fizzing Weston shot and Karleigh Osborne headed the resulting corner over.
Michel had a shot blocked and Legge made a vital tackle when Derbyshire got in behind and tried to find O'Connor.
Spillane made another good tackle when Bowyer found space and seconds before the break Legge turned a Phillips cross narrowly past his own post.
The Bees had been competitive in the first period but took control of the game in the early stages of the second.
Wood had an overhead effort saved while at the other end Lee saved from Craig Gardner and Liam Ridgewell looped a header over.
But the main chances were being created by The Bees - Ridgewell turned a Charlie MacDonald cross inches over his own bar, Spillane had a volley cleared off the line by Michel and Marcus Bean lifted an effort over.
Parnaby shot over from long range and Bowyer toe-ended a shot wide after breaking through before the opening goal came at the other end.
Weston played the ball in, MacDonald nodded it down and Wood arrived and lashed it into the net to send the travelling fans into raptures.
Birmingham tried to find a way back into it - Legge blocked a Gardner shot and the same player then had a shot deflected wide.
Nathan Redmond shot over before Lee made a fine diving save to tip away a curling Gardner shot and Ridgewell headed the resulting corner wide.
The Bees were dangerous on the break and almost sealed it when a curling Craig Woodman free kick clipped the top of the crossbar.
Nikola Zigic headed over for Birmingham, but just when it seemed they had run out of ideas they equalised.
The ball was loose on the edge of the box, it dropped to Ridgewell, he fed Phillips and the striker slotted home from eight yards.
Zigic should have won it in the first half of extra time with a header from eight yards the Lee saved brilliantly and there were other openings.
Bean shot wide for Brentford and Robbie Simpson had a header saved while at the other end, Zigic headed over and Phillips shot narrowly wide on the turn.
There were fewer chances in the second period - when The Bees were awarded a free kick form a Ridgewell back pass, Simpson saw an effort blocked and Taylor saved from Grabban.
At the other end Gardner fires a free kick wide in the dying seconds but with no goals it went to penalties and Birmingham prevailed.
Birmingham City: Taylor; Carr, Ridgewell, Dann, Parnaby; Bowyer, Gardner, Michel (sub Ferguson 90 mins); Phillips; O'Connor (sub Redmond 64 mins), Derbyshire (sub Zigic 77 mins)
Subs (not used): Foster, Johnson, Fahey, Asante
Brentford: Lee; Spillane, Osborne, Legge, Woodman; Wood, Bean, O'Connor, Weston (sub Simpson 83 mins); MacDonald (sub Hunt 101 mins), Alexander (sub Grabban 75 mins)
Subs (not used): Royce, McCracken, Balkestein, Diagouraga
Bookings: MacDonald (87 mins) (second of season), Lee (90 mins), Osborne (90 mins) (fourth of season)
Attendance: 15,166 (3,123 Bees fans)
By Chris Wickham