West Ham climbed out of the relegation zone after winning an eight goal thriller against Burnley at Upton Park.

The Hammers led 3-0 at half-time through goals from Jack Collison, Junior Stanislas and Carlton Cole and sealed the points early in the second half with Guillermo Franco scoring a fourth and Luis Jiminez notching from the spot for a fifth.

Burnley rallied to grab three consolation goals with Chris Eagles setting up Steven Fletcher twice and then adding another himself.

In a bright game where both teams kept the ball on the floor it was only pathetic defending from the Clarets that was the difference between the sides after an open first fifteen minutes. Andre Bikey had forced a smart save from Rob Green and Clarke Carlisle’s header had to be cleared off the line by Scott Parker.

Parker – the game’s outstanding player – then took a quick free-kick and Collison sprung the offside trap to finish well past Brian Jensen in the Burnley goal to open the scoring.

And before the visitors could get back into the game it was two. Burnley will point to a handball from Franco in the build-up but the defending was again poor as Jensen allowed Stanislas to finish between his legs after saving his initial shot.

The points were effectively sealed two minutes before the break when Cole capitalised on Robbie Blake’s foul on Jonathan Spector to make it 3-0 from the penalty spot.

Burnley manager Owen Coyle would have looked for a reaction from his players but it didn’t come and Franco headed in a fourth from Stanislas’ cross to make sure of the hosts’ third league win of the season.

David Nugent’s addition galvanised the Clarets but he missed two good chances in quick succession, opportunities which Burnley would later look back at and think ‘what if?’

But any lingering hopes were extinguished when Jensen brought Jiminez down, the Chilean dusting himself off to convert the penalty.

That fifth goal oddly seemed to brighten Burnley up as West Ham relaxed and Eagles, a rare bright spot in a terrible afternoon for the Clarets, twice set up Fletcher for simple finishes from six yards.

Eagles hit the post from a free-kick as the visitors sensed the unlikeliest of comebacks but skipper Steven Caldwell’s red card for hauling down Zavon Hines put paid to those hopes.

But Burnley somehow scored again, Eagles finishing off Tyrone Mears’ cross.

Both managers will be left scratching their head at a baffling scoreline that could easily have been 8-8. But Gianfranco Zola will simply be relieved that his team managed to hold out to a lead to seal only a second home win of the season. Burnley are still winless on the road and if they continue to defend this badly, that record will not be broken any time soon.