Danny Fox had a debut to remember as Brian Laws picked up his first win as Burnley manager to see his side leapfrog West Ham and climb out of the relegation zone after a 2-1 win at Turf Moor.

The former Celtic left-back set up Burnley’s opener for David Nugent and then slammed home a free-kick to double the lead.

West Ham rallied at the death but could only score a consolation from fellow debutant Ilan, with Carlton Cole having a goal disallowed for offside and the Hammers twice hitting the woodwork.

It was a surprisingly good game of football considering the poor form of the two sides. Burnley started the more enterprising of the sides and took a deserved lead 14 minutes in when Fox looked up and took his time to flick a flighted ball over Matthew Upson for Nugent to chase.

Upson fatally left the ball drop and with fellow England man Rob Green in no-mans-land, Nugent flicked the ball over the goalkeeper into the empty net to celebrate his fourth league goal of the season.

Leon Cort had to clear off the line after Benni McCarthy had squeezed a shot past Brian Jensen, but other than that, and an effort that flew just wide from Scott Parker, West Ham struggled to make an impact on the first half.

Burnley thought they should have had a penalty when Jack Collison sent Cort sprawling from a corner, but Mike Dean was not interested.

But the next time Collison was not so lucky. Early in the second half Tyrone Mears went on an adventurous run down Burnley’s right and the Welsh midfielder sent him sprawling. Fox, buoyed from an impressive first half performance, stepped up to crash the free-kick across Green and into the top corner from a tight angle.

A two goal lead flattered Burnley somewhat and as the game went on the more West Ham came into it, under the influence of Scott Parker, who began to run the midfield. But Jensen was equal to Parker’s best efforts, making a quite brilliant save from Parker’s 20 yard shot.

Gianfranco Zola threw on Ilan and Junior Stanislas to join Mido who had come on at half-time in a four-man attack, but the Hammers lacked the thrust to cause Burnley problems. That said, Stanislas hit the bar with an effort similar to Fox’s goal and Cole bundled home from inches out from an offside position as Burnley drew nervous.

And a grandstand finish was set up after Ilan finished well after a scramble in the penalty area, beating Jensen from ten yards.

But Mido spurned the chance to steal a point, hitting the post when it looked easier to score in injury time and Burnley held on for their first league win since October.