Struggling West Ham lifted the pressure on manager Sam Allardyce with a battling win at Cardiff City.

The visitors had to survive a serious injury to Guy Demel and the sending-off of James Tomkins to claim their first Premier League win in seven attempts.

West Ham led when Carlton Cole was picked out by Matt Jarvis, before Mark Noble's late breakaway settled things.

It ruined Ole Gunnar Solskjaer's league debut as Cardiff boss as his side replaced West Ham in the bottom three.

Despite public support from West Ham co-owners David Gold and David Sullivan, Allardyce brought his team to the Welsh capital second-bottom and three points behind their hosts.

On top of that were humbling defeats in their previous two matches, with a 5-0 loss to Championship side Nottingham Forest in the FA Cup followed by a 6-0 defeat by Manchester City in the Capital One Cup semi-final first leg.

More Hammers hurt for Cardiff

West Ham have now won their past five league encounters against Cardiff without conceding a goal - including the 2011-12 Championship play-off semi-finals

But, despite the return of £15m striker Andy Carroll to the West Ham bench after an eight-month absence, it was far from the perfect afternoon for Allardyce's side.

The game was stopped for 10 minutes when Ivory Coast defender Demel suffered a serious head injury, falling awkwardly as he challenged Fraizer Campbell.

After the application of a neck brace and oxygen, he was taken off on a stretcher and replaced by George McCartney.

The sending-off of Tomkins, shown his second yellow card for catching Campbell in the face, will further compound Allardyce's defensive worries with James Collins and Winston Reid still out through injury.

But after all the pre-match attention on Carroll it was Cole, signed only on a short-term deal, who gave the Hammers a much-needed lift.

When Matt Taylor picked out Jarvis on the right, his low cross allowed Cole to muscle his way in front of Kevin Theophile-Catherine to smash the ball past Cardiff goalkeeper David Marshall.

Cole nearly added a second after half-time, but Bluebirds captain Mark Hudson - making his first Premier League appearance of the season - stretched to nip the ball off the striker's toe.

The 30-year-old was replaced for the final 18 minutes by Carroll and departed to a standing ovation from the travelling fans.

Solskjaer began his Cardiff reign last week with an FA Cup win at Newcastle, and the Norwegian saw his side nearly come from behind again.

Firstly, Kim Bo-Kyung's deflected shot came off the underside of the bar, before Craig Noone drew a full-length save out of goalkeeper Adrian.

After all that Cardiff pressure, Cole's goal came as something of a sucker-punch and Solskjaer responded at half-time by replacing striker Peter Odemwingie with Craig Bellamy, making his return after two months out.

The former Wales captain nearly created an equaliser, racing free on the right to pick out Campbell, whose fierce shot drew a brilliant reaction save out of Adrian.

Solskjaer sent on new signing Magnus Wolff Eikrem in place of Gary Medel in midfield, then replaced Hudson with striker Andreas Cornelius in the hunt for an equaliser.

West Ham nerves jangled when Eikrem unleashed a pile-driver, only to hit it straight at Adrian, but in injury time, a swift counter caught Cardiff over-committed and Noble's cool finish sealed a crucial result.

For photos from Saturday's Premier League action go to BBC Sport's Facebook page 

Lineup, Bookings (6) & Substitutions (6)

Cardiff City

  • 01 Marshall
  • 28 Théophile-Catherine
  • 42 John
  • 07 Whittingham
  • 04 Caulker
  • 05 Hudson (Cornelius - 78' )
  • 16 Noone
  • 08 Medel Booked (Wolff Eikrem - 65' )
  • 10 Campbell
  • 13 Kim
  • 11 Odemwingie (Bellamy - 45' )

Substitutes

  • 06 Turner
  • 09 Cornelius
  • 15 Wolff Eikrem
  • 17 Gunnarsson
  • 25 McNaughton
  • 32 Lewis
  • 39 Bellamy

West Ham United

  • 13 Adrián
  • 20 Demel (McCartney - 17' Booked )
  • 08 Rat
  • 14 Taylor
  • 28 Johnson Booked
  • 05 Tomkins Dismissed after an earlier booking
  • 23 Downing
  • 16 Noble
  • 24 Cole (Carroll - 72' )
  • 10 Collison (Diarra - 75' Booked )
  • 07 Jarvis

Substitutes

  • 03 McCartney
  • 09 Carroll
  • 11 Maiga
  • 18 Diarra
  • 21 Diamé
  • 22 Jääskeläinen
  • 26 Cole
Ref: Lee Mason
Att: 27,750

Match Stats

Shots

19 10

On target

7 3

Corners

8 7

Fouls

7 16

Live Text Commentary

Full time

Full Time Match ends, Cardiff City 0, West Ham United 2.

90:00 +4:16 Full time

Full Time Second Half ends, Cardiff City 0, West Ham United 2.

90:00 +2:36 Goal scored

Goal! Goal! Cardiff City 0, West Ham United 2. Mark Noble (West Ham United) right footed shot from the right side of the box to the bottom left corner. Assisted by Andy Carroll.

90:00 +1:49

Attempt missed. Andreas Cornelius (Cardiff City) header from the centre of the box misses to the right. Assisted by Magnus Wolff Eikrem with a cross.

90:00 +0:50

Attempt saved. Kim Bo-Kyung (Cardiff City) right footed shot from outside the box is saved in the centre of the goal.

89:43 Booking

Booking Alou Diarra (West Ham United) is shown the yellow card for a bad foul.

89:40

Craig Bellamy (Cardiff City) wins a free kick in the attacking half.

89:40

Foul by Alou Diarra (West Ham United).

88:31

Corner, West Ham United. Conceded by Craig Noone.

86:31

Foul by Craig Noone (Cardiff City).

86:31

Adrián (West Ham United) wins a free kick in the defensive half.

85:33

Attempt saved. Magnus Wolff Eikrem (Cardiff City) right footed shot from outside the box is saved in the centre of the goal. Assisted by Kim Bo-Kyung.

83:36

Corner, Cardiff City. Conceded by George McCartney.

83:19

Attempt blocked. Peter Whittingham (Cardiff City) left footed shot from outside the box is blocked.

81:05

Attempt saved. Craig Bellamy (Cardiff City) right footed shot from outside the box is saved in the centre of the goal. Assisted by Kim Bo-Kyung.

80:13

Foul by Kim Bo-Kyung (Cardiff City).

80:13

Adrián (West Ham United) wins a free kick in the defensive half.

77:35 Substitution

Substitution Substitution, Cardiff City. Andreas Cornelius replaces Mark Hudson.

77:11

Attempt missed. Craig Bellamy (Cardiff City) right footed shot from outside the box misses to the right. Assisted by Kim Bo-Kyung.

74:57 Substitution

Substitution Substitution, West Ham United. Alou Diarra replaces Jack Collison.

74:15

Foul by Kévin Théophile-Catherine (Cardiff City).

74:15

Mark Noble (West Ham United) wins a free kick in the defensive half.

71:40 Dismissal

Dismissal Second yellow card to James Tomkins (West Ham United) for a bad foul.

71:35

Fraizer Campbell (Cardiff City) wins a free kick on the right wing.

71:35

Foul by James Tomkins (West Ham United).

71:08 Substitution

Substitution Substitution, West Ham United. Andy Carroll replaces Carlton Cole.

70:22

Attempt missed. Craig Bellamy (Cardiff City) right footed shot from outside the box is close, but misses to the left from a direct free kick.

69:32 Booking

Booking Roger Johnson (West Ham United) is shown the yellow card for a bad foul.

69:29

Fraizer Campbell (Cardiff City) wins a free kick in the attacking half.

69:29

Foul by Roger Johnson (West Ham United).

68:33

Steven Caulker (Cardiff City) wins a free kick in the defensive half.

68:33

Foul by Carlton Cole (West Ham United).

68:04

Foul by Fraizer Campbell (Cardiff City).

68:04

James Tomkins (West Ham United) wins a free kick in the defensive half.

67:20

Attempt missed. Jack Collison (West Ham United) left footed shot from the right side of the box is too high. Assisted by Stewart Downing.

66:31

Attempt missed. Steven Caulker (Cardiff City) header from very close range misses to the right. Assisted by Craig Bellamy with a cross following a corner.

66:08

Corner, Cardiff City. Conceded by George McCartney.

64:14 Substitution

Substitution Substitution, Cardiff City. Magnus Wolff Eikrem replaces Gary Medel.

63:42

Attempt missed. Matthew Jarvis (West Ham United) right footed shot from outside the box is close, but misses to the right. Assisted by Matthew Taylor following a fast break.

62:47

Attempt saved. Peter Whittingham (Cardiff City) right footed shot from the centre of the box is saved in the centre of the goal. Assisted by Kim Bo-Kyung.

60:30 Booking

Booking James Tomkins (West Ham United) is shown the yellow card for a bad foul.

60:20

Fraizer Campbell (Cardiff City) wins a free kick on the right wing.

60:20

Foul by James Tomkins (West Ham United).

59:46

Mark Hudson (Cardiff City) wins a free kick in the defensive half.

59:46

Foul by Carlton Cole (West Ham United).

59:13

Attempt saved. Peter Whittingham (Cardiff City) left footed shot from outside the box is saved in the centre of the goal. Assisted by Fraizer Campbell.

58:07

Corner, Cardiff City. Conceded by Stewart Downing.

57:40

Corner, Cardiff City. Conceded by Adrián.

57:37

Attempt saved. Fraizer Campbell (Cardiff City) right footed shot from the centre of the box is saved in the top centre of the goal. Assisted by Craig Bellamy with a cross.

56:12

Corner, Cardiff City. Conceded by Jack Collison.

56:09

Attempt blocked. Gary Medel (Cardiff City) left footed shot from outside the box is blocked. Assisted by Kim Bo-Kyung.

55:17

Kévin Théophile-Catherine (Cardiff City) wins a free kick in the defensive half.

55:17

Foul by Carlton Cole (West Ham United).

54:31

Offside, Cardiff City. Kévin Théophile-Catherine tries a through ball, but Fraizer Campbell is caught offside.

53:47

Attempt missed. Steven Caulker (Cardiff City) header from the centre of the box misses to the left. Assisted by Peter Whittingham following a set piece situation.

53:23

Kévin Théophile-Catherine (Cardiff City) wins a free kick on the right wing.

53:23

Foul by Matthew Jarvis (West Ham United).

52:44

Attempt missed. Matthew Jarvis (West Ham United) right footed shot from outside the box misses to the left. Assisted by Mark Noble with a through ball.

49:17 Booking

Booking George McCartney (West Ham United) is shown the yellow card for a bad foul.

49:09

Craig Noone (Cardiff City) wins a free kick on the left wing.

49:09

Foul by George McCartney (West Ham United).

48:08

Corner, West Ham United. Conceded by Mark Hudson.

47:12

Attempt missed. Mark Hudson (Cardiff City) header from the centre of the box is too high. Assisted by Craig Bellamy with a cross following a set piece situation.

46:29

Kim Bo-Kyung (Cardiff City) wins a free kick in the attacking half.

46:29

Foul by James Tomkins (West Ham United).

45:00

Second Half begins Cardiff City 0, West Ham United 1.

45:00 Substitution

Substitution Substitution, Cardiff City. Craig Bellamy replaces Peter Odemwingie.

45:00 +10:10 Half time

Half Time First Half ends, Cardiff City 0, West Ham United 1.

45:00 +9:14 Booking

Booking Gary Medel (Cardiff City) is shown the yellow card.

45:00 +8:45

Gary Medel (Cardiff City) wins a free kick in the defensive half.

45:00 +8:45

Foul by Matthew Taylor (West Ham United).

45:00 +7:06

Attempt missed. Matthew Taylor (West Ham United) left footed shot from outside the box is high and wide to the left. Assisted by George McCartney.

45:00 +4:59

Corner, West Ham United. Conceded by Peter Odemwingie.

45:00 +0:05

Foul by Craig Noone (Cardiff City).

45:00 +0:05

Mark Noble (West Ham United) wins a free kick in the defensive half.

44:44

Corner, Cardiff City. Conceded by Matthew Taylor.

43:20

Fraizer Campbell (Cardiff City) wins a free kick on the right wing.

43:20

Foul by Razvan Rat (West Ham United).

42:41

Attempt missed. Matthew Taylor (West Ham United) right footed shot from the centre of the box is close, but misses to the left.

41:02 Goal scored

Goal! Goal! Cardiff City 0, West Ham United 1. Carlton Cole (West Ham United) right footed shot from the centre of the box to the top left corner. Assisted by Matthew Jarvis.

39:51

Attempt saved. Craig Noone (Cardiff City) left footed shot from outside the box is saved in the bottom right corner. Assisted by Kim Bo-Kyung.

38:22

Kim Bo-Kyung (Cardiff City) wins a free kick in the attacking half.

38:22

Foul by Razvan Rat (West Ham United).

36:15

Mark Hudson (Cardiff City) wins a free kick in the defensive half.

36:15

Foul by Carlton Cole (West Ham United).

34:30

Attempt missed. Roger Johnson (West Ham United) header from the centre of the box misses to the left. Assisted by Mark Noble with a cross following a corner.

34:03

Corner, West Ham United. Conceded by Mark Hudson.

31:31

Foul by Fraizer Campbell (Cardiff City).

31:31

Adrián (West Ham United) wins a free kick in the defensive half.

31:24

Attempt blocked. Kim Bo-Kyung (Cardiff City) left footed shot from outside the box is blocked. Assisted by Gary Medel with a headed pass.

30:21

Attempt missed. Fraizer Campbell (Cardiff City) header from the centre of the box is too high. Assisted by Craig Noone with a cross.

28:53

Corner, Cardiff City. Conceded by George McCartney.

27:24

Hand ball by Stewart Downing (West Ham United).

26:04

Attempt missed. Mark Noble (West Ham United) right footed shot from outside the box misses to the right. Assisted by Stewart Downing.

24:50

Attempt missed. Mark Hudson (Cardiff City) header from the centre of the box is too high. Assisted by Peter Whittingham with a cross following a corner.

24:22

Corner, Cardiff City. Conceded by George McCartney.

24:19

Attempt blocked. Craig Noone (Cardiff City) left footed shot from the left side of the box is blocked. Assisted by Peter Odemwingie with a cross.

20:00

Delay over. They are ready to continue.

19:00

Delay in match Fraizer Campbell (Cardiff City) because of an injury.

19:00

Delay in match George McCartney (West Ham United) because of an injury.

17:21

Offside, West Ham United. Matthew Taylor tries a through ball, but Carlton Cole is caught offside.

16:32 Substitution

Substitution Substitution, West Ham United. George McCartney replaces Guy Demel because of an injury.

16:30

Delay over. They are ready to continue.

7:55

Delay in match Guy Demel (West Ham United) because of an injury.

4:59

Corner, West Ham United. Conceded by Steven Caulker.

4:19

Corner, West Ham United. Conceded by Steven Caulker.

3:27

Attempt saved. James Tomkins (West Ham United) right footed shot from the left side of the six yard box is saved in the centre of the goal.

2:51

Corner, West Ham United. Conceded by Declan John.

1:26

Mark Noble (West Ham United) wins a free kick in the attacking half.

1:26

Foul by Kim Bo-Kyung (Cardiff City).

0:37

Foul by Carlton Cole (West Ham United).

0:37

Kévin Théophile-Catherine (Cardiff City) wins a free kick in the defensive half.

0:00

First Half begins.

0:00

Lineups are announced and players are warming up.

Live data and text provided by our data suppliers