Sam Allardyce earned a crucial victory that could help keep him in a job as 10-man West Ham inflicted a 2-0 defeat on Cardiff City in an extraordinary, incident-packed match that was Ole Gunnar Solskjaer’s first home game as manager.

Having conceded 11 goals without reply in their past two games, West Ham almost had an early opener when David Marshall misjudged a Stewart Downing cross after eight minutes and let it bounce onto his post; Marshall made amends immediately with a fine save to deny James Tomkins on the follow-up.

Though the return of Andy Carroll to the bench alleviated Allardyce’s injury problems somewhat, he was soon presented with another when Roger Johnson continued his calamitous start to life at West Ham by colliding with Guy Demel in the air. Demel needed nine minutes of treatment before being taken to hospital with a reported dislocated elbow.

Cardiff struck the woodwork themselves when a Kim effort flicked off Johnson and caught the underside of the bar, but the Hammers did take the lead on 42 minutes when Matt Jarvis poked a clever low cross to Carlton Cole, who swept the ball home first time from close range.

Solskjaer’s men pressed forward in the second half, only to see referee Lee Mason wave away a number of penalty appeals and Adrian deny Fraizer Campbell with a remarkable save from substitute Craig Bellamy’s low centre. James Tomkins was shown a second yellow card for a second foul on Campbell after 73 minutes in an incident which seemingly gave Cardiff more hope.

But Carroll’s lengthy return from injury was complete when he emerged from the bench for his first appearance of the season after 72 minutes, and a fine afternoon for West Ham – injuries and red cards aside – was complete in injury time when he teed up Mark Noble to secure the win which puts the Hammers above Cardiff and into 17th place.

KEY MOMENTS

PRE-MATCH: Andy Carroll returned to the bench for West Ham in anticipation of making his first appearance of the season. Cardiff, meanwhile, had new signing Magnus Wolff Eikrem available as a substitute.

4’ – HAMMERS HIT THE POST: A rather hopeful Downing cross somehow bobbles through to strike the woodwork but when the ball drops to Tomkins unmarked he can’t beat David Marshall! Marshall leaves it, then makes good save.

8' – DEMEL GOES OFF: Roger Johnson’s elbow connects with Guy Demel’s face and the defender goes down in a heap, needing lengthy treatment from the West Ham medics. On comes George McCartney in his place.

24’ – ODEMWINGIE MAGIC: Cardiff probe down the right wing and retain possession despite a sloppy pass from Kim wide to Odemwingie. The Nigerian then darts past a couple of men, exhibiting fantastic close control, before crossing for Craig Noone, who has a firm drive deflected over by McCartney!

32’ – CARDIFF HIT THE BAR: Johnson backs off to allow Kim to have a shot and the ball deflects off the West Ham defender and against the underside of the bar. The ball looks to cross the line before Campbell fouls Adrian on the follow-up – but there’s nothing from Hawkeye so the whole of the ball did not cross the line.

42' – CARLTON GOAL: The striker sweeps a finish into the top corner following a clever quick cross from Jarvis, who sprung the offside trap.

58’ – SUPER SAVE: Cardiff hit on the break and when Bellamy centres for Campbell the striker looks certain to score. His shot is firm and true but Adrian makes an astonishing save to flick the ball over with his fingers.

73’ - RED CARD: Tomkins is shown his second booking of the afternoon as he catches Campbell in the face with a high boot. An undisciplined afternoon for West Ham.

90+3’ – A NOBLE FINISH: The West Ham midfielder settles it late on as he knocks the ball past Marshall after a square pass from Carroll. Horrid goalkeeping.

KEY STATS

Solskjaer scored seven times against West Ham United in the Premier League; making them his joint-favourite opponents (along with Everton, Tottenham and Charlton). (Opta)

Carlton Cole scored his 37th Premier League goal for West Ham, moving him outright second in the club's leading scorers list. He was previously joint-second with Trevor Sinclair (36). Only Paolo Di Canio (48) has scored more for West Ham in the Premier League. (Infostrada)

There was a total of 10 minutes and seven seconds played in first-half injury-time in this match – the previous most was eight mins and 32 seconds in Blackburn’s 1-1 home draw v Birmingham in April 2011. (Infostrada)

TALKING POINT

Can Sam Allardyce cling onto his job? Reports in the week would have you believe West Ham are already lining up Billy Davies as Big Sam’s replacement but today’s win should buy him some time. With Carroll returning to fitness, could this be the result that signals a turnaround in fortunes for the under-pressure West Ham manager?

MATCHCAST: FULL COMMENTARY AND PLAYER RATINGS

MAN OF THE MATCH

Mark Noble (West Ham): He had the final flourish but Noble set the tone throughout for West Ham with an industrious and hearty performance. He helped drag his team forward when a man down following the red card shown to Tomkins.

PLAYER RATINGS

Cardiff: Marshall 5, Theophile-Catherine 6, Hudson 7, Caulker 6, John 6, Whittingham 5, Medel 6, Kim 6, Noone 7, Campbell 6, Odemwingie 5. Subs: Cornelius 6, Eikrem 6, Bellamy 6.

West Ham: Adrian 8, Demel 6, Tomkins 5, Johnson 5, Rat 6, Downing 6, Noble 8, Taylor 6, Collison 6, Jarvis 7, C.Cole 7. Subs: McCartney 6, Diarra 6, Carroll 7.

THE MATCH IN A TWEET