West Ham United will travel to St Andrew's with a slender Carling Cup semi-final advantage after scoring a stirring 2-1 first-leg victory over Birmingham City at the Boleyn Ground.
The Hammers dominated the opening 45 minutes, creating numerous chances and going in 1-0 up at half-time through Mark Noble's outstanding 13th-minute strike.
However, Birmingham emerged re-charged after the break and equalised through a powerful Liam Ridgewell header eleven minutes into the second period.
When Victor Obinna was sent-off for a challenge on Sebastian Larsson moments later, it appeared as if West Ham's Wembley dreams could disappear.
Birmingham pressed hard for a winner, but instead it was the ten men in claret and blue who forged a first-leg advantage when the previously unbeatable Ben Foster allowed Carlton Cole's first-time shot to squeeze under his left leg and into the net.
With the Boleyn Ground bouncing with noise, the Hammers held on to take what could be a vital lead to the Midlands on Wednesday 26 January.
In front of the live BBC cameras, the first leg was a thrilling spectacle from the kick-off until the final whistle.
West Ham went on the offensive almost from the start, making neat patterns and moving confidently in a new 4-4-1-1 formation with captain Matthew Upson at left-back and Jonathan Spector supporting lone striker Frederic Piquionne.
It was Upson who forced Foster to make his first save, reacting quickest to stab the ball towards the top corner before the England goalkeeper intervened with his fists.
The opening goal arrived on 13 minutes and was both created and scored by Noble.
The No16 beat two defenders before crossing for Obinna to head down and Spector to hook the ball across the six-yard box. It bounced high enough for Noble to rifle a shot between Scott Dann, Foster and the near post.
Having gone ahead, West Ham went for the kill, with Spector and Obinna both stinging Foster's palms with rasping efforts.
Had it not been for the Blues' No26, the tie could have been over before half-time.
As it was, despite losing Dann to a torn hamstring at the break, Birmingham came out all guns blazing after the break and deservedly levelled when Ridgewell nipped in to power Larsson's corner past Robert Green.
When Obinna was dismissed for kicking out at the Sweden winger, the Hammers were suddenly reeling, but the back four stood firm in the face of a barrage of dangerous crosses and corners.
With 18 minutes to go, Birmingham screamed loudly for a penalty when Upson tangled with Barry Ferguson, but referee Phil Dowd waved away the visitors' claims.
Seconds later, Hammers boss Avram Grant threw on Cole and Zavon Hines in what turned out to be a tactical masterstroke.
There were 12 minutes remaining when Scott Parker picked out Spector's intelligent run down the right channel. The American held off Dann's replacement David Murphy before pulling the ball back into the path of Cole.
While the striker's shot lacked power, it was on target and proved too hot to handle for England team-mate Foster, who allowed the ball to slide under his body and roll slowly over the line for a memorable winner.
Grant, who threw his claret and blue scarf into the crowd at full-time, was delighted with the application shown by his players.
"I am very happy with the players and they do like to play in the cup. They have been great in the league matches as well against Wolves, Everton and Fulham away but today, it was very hard, because we were with ten players for a long time.
"The spirit was great. It is not easy to play so many games in short time."