Fulham started well and took the lead through Dimitar Berbatov's controversial header from a Damien Duff free kick and went into the break with the lead intact.
West Ham responded in the second half and equalised through Kevin Nolan. However, Fulham hit back just 33 seconds later with a Hugo Rodallega goal and wrapped up the win in stoppage time with a Joey O'Brien own-goal.
Here, Sports Mole analyses the result to decide if the points went the correct way.
On target 4
On target 4
Was the result fair?
The result was, but 3-1 was perhaps flattering. Fulham started the better side and took a deserved lead, but West Ham responded well to equalise. However, when Rodallega notched right back again the Hammers were always chasing and Fulham held on well.
Much, much improved. Throughout their recent poor spell, Fulham were very sluggish going forward and created barely any chances. Tonight, however, there was much more urgency and aside from the goals they did score they could have had more. At the back they were a little dodgy at times but overall were very solid.
West Ham's performance
They were okay in patches, but were out of the game for too many spells, which cost them dear in the end. When they were chasing the game having got themselves right back in it, the one-dimensional manner of their attacks did not manage to penetrate a dogged hosts' defence.
Sports Mole's man of the match
Damien Duff: The Irishman picked up two superb assists with teasing balls into the box and was very good in possession. More than just that, however, he protected an unfamiliar left flank brilliantly: most of West Ham's attacking threat came from Ryan Jarvis on the opposite side.
There weren't very many individual errors in the game, so West Ham will have to claim this award for their lack of concentration immediately after scoring. Just 33 seconds, one Duff cross and a Rodallega header later and they were once again behind.
Chris Foy was very good tonight. He could have panicked and sent off Steve Sidwell for a crunching tackle in the first half, but he took his time and produced the correct yellow card. Aside from that, he let the game flow when possible and correctly turned down Joe Cole's appeals for a penalty early in the second half.
Fulham: Things are looking a little more rosy at the Cottage now, and they will face Manchester United there full of confidence at the weekend.
West Ham: West Ham will go into Saturday's home encounter with Swansea City under a little bit more pressure following their three defeats in four league games.