Avram Grant was thrown a lifeline as West Ham boss after his ten-man team snatched a slim first-leg advantage over Birmingham.

Carlton Cole (centre) celebrates his fortunate winner with his West Ham team-mates (Getty)

Grant is sure to remain under intense scrutiny with the Hammers bottom of the Premier League but Ben Foster ’s howler at least gives him a lead to take to St Andrew’s – if he remains in charge – on January 26, after it looked like his side had blown their chance when Victor Obinna was sent off.

The hosts dominated the first half and took the lead after 13 minutes when Birmingham failed to clear their lines and Jonathan Spector ’s miscued shot fell to Mark Noble , who volleyed West Ham in front.

Foster then came to the fore as he made terrific saves to keep out Matthew Upson , Scott Parker , James Tomkins and Obinna.

After the break, though, things went rapidly downhill for the Hammers as Alex McLeish’s Blues pressed hard for a leveller.

It duly arrived on 56 minutes when Sebastian Larsson swung in a corner and Liam Ridgewell powered a header past Robert Green.

Three minutes later it got worse for West Ham when Obinna saw red after kicking out at Larsson and his team’s good work began to unravel.

The last word went to Cole, however, just five minutes after replacing Freddie Piquionne, as his shot from Spector’s centre took a slight deflection and England goalkeeper Foster spilt the ball through his legs to leave West Ham in pole position.