Last updated on .From the section Premier League

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 external-link