Second-placed Reading moved four points ahead of West Ham in the race for the Premier League with a crucial victory at Upton Park.
West Ham took an early lead through Carlton Cole before two goals in two minutes from Kaspars Gorkss and Noel Hunt gave Reading a half-time lead.
Ian Harte made it 3-1 from the penalty spot before Ricardo Vaz Te's header pulled one back for the hosts.
But Mikele Leigertwood's shot late on sealed victory for Reading.
The Hammers have slipped out of the automatic promotion spots at the expense of the Berkshire club, following a miserable run of one win in their last seven matches.
It has prompted an angry response from their disgruntled fans, with boss Sam Allardyce being forced to defend his team's style of play.
Cole broke the deadlock for the Hammers in the ninth minute with a left-footed finish after a headed knockdown from Kevin Nolan, who had hit a post just seconds earlier.
Gorkss headed home Harte's inswinging corner in the 44th minute before Hunt converted on the stroke of half-time to give the Royals the lead.
Harte added a penalty after 59 minutes to further stretch their advantage, but the Hammers responded with a Vaz Te header after 77 minutes.
But Leigertwood's strike six minutes from time eventually wrapped up the win for Reading.
Allardyce's men are now four points behind their rivals with only six games to play.
West Ham boss Sam Allardyce: "We shot ourselves in the foot.
"We gifted them three goals. We can't afford to make those errors and that's ultimately why we got beaten.
"To keep up with Reading we have to win six on the trot."
Reading manager Brian McDermott: "It's three points, that's all it is.
"It's never easy to go 1-0 down here but we stayed in the game, got ourselves a goal and to go in 2-1 up was massive.
"Then in the second half I felt we deserved to win. But I've been around this game a long time so I'm not cock-a-hoop yet."
West Ham United
- 01 Green
- 03 McCartney
- 05 Tomkins Booked
- 15 Faye
- 18 Faubert Booked
- 04 Nolan
- 14 Taylor (Baldock - 60' )
- 16 Noble (Collins - 46' )
- 32 O'Neil
- 09 Cole (Maynard - 72' )
- 12 Vaz Te
- 25 Collins
- 22 Lansbury
- 07 Baldock
- 08 Maynard
- 11 Carew
- 01 Federici
- 05 Pearce
- 17 Gorkss
- 23 Harte
- 24 Cummings
- 04 Karacan (Tabb - 55' )
- 08 Leigertwood
- 11 McAnuff
- 14 Kebe (Afobe - 82' )
- 10 Hunt
- 33 Roberts Booked
- 12 McCarthy
- 07 Tabb (Robson-Kanu - 67' )
- 19 Robson-Kanu
- 18 Church
- 51 Afobe
Live Text Commentary
Full Time The referee brings the game to a close.90:00 +5:40 Booking
Booking Julien Faubert goes into the referee's book.90:00 +5:37
Julien Faubert gives away a free kick for an unfair challenge on Hal Robson-Kanu. Ian Harte restarts play with the free kick.90:00 +3:29
Nicky Maynard takes a shot. Comfortable save by Adam Federici.90:00 +2:31
Danny Collins gives away a free kick for an unfair challenge on Jason Roberts. Shaun Cummings takes the indirect free kick.90:00 +1:43
Free kick awarded for a foul by Hal Robson-Kanu on Julien Faubert. Gary O'Neil restarts play with the free kick.88:35
Foul by Jobi McAnuff on Gary O'Neil, free kick awarded. Free kick taken by Robert Green.87:56
Kevin Nolan takes a shot. Adam Federici makes a comfortable save.86:55
Jason Roberts takes a shot. Abdoulaye Faye gets a block in.85:16
Free kick awarded for an unfair challenge on Hal Robson-Kanu by Julien Faubert. Indirect free kick taken by Adam Federici.83:47
The assist for the goal came from Noel Hunt.83:47 Goal scored
Goal! - Mikele Leigertwood - West Ham 2 - 4 Reading Mikele Leigertwood fires in a goal from just inside the penalty area to the top right corner of the goal. West Ham 2-4 Reading.81:58 Substitution
Substitution Benik Afobe is brought on as a substitute for Jimmy Kebe.80:23
Corner taken by Ian Harte from the right by-line played to the near post, James Tomkins manages to make a clearance.79:18
Inswinging corner taken left-footed by Ian Harte played to the near post, Kevin Nolan manages to make a clearance.76:16
Assist by Gary O'Neil.76:16 Goal scored
Goal! - Ricardo Vaz Te - West Ham 2 - 3 Reading Ricardo Vaz Te grabs a headed goal from inside the area. West Ham 2-3 Reading.75:51
Outswinging corner taken right-footed by Gary O'Neil from the right by-line,73:56 Booking
Booking James Tomkins is given a yellow card.71:05 Substitution
Substitution Nicky Maynard is brought on as a substitute for Carlton Cole.
Corner taken by Ian Harte played to the near post, clearance made by Carlton Cole.69:25
Long distance shot from Ricardo Vaz Te misses to the left of the target.68:01
Jobi McAnuff takes a shot. Save made by Robert Green.67:37
Jason Roberts fouled by Abdoulaye Faye, the ref awards a free kick. Ian Harte takes the free kick.66:01 Substitution
Substitution Hal Robson-Kanu replaces Jay Tabb.63:41
Jobi McAnuff takes a shot. Robert Green makes a comfortable save.63:01
Inswinging corner taken right-footed by Gary O'Neil, clearance by Kaspars Gorkss.61:54
Jobi McAnuff produces a right-footed shot from just outside the box that misses to the right of the target.61:00
Jimmy Kebe challenges Ricardo Vaz Te unfairly and gives away a free kick. Gary O'Neil takes the direct free kick.59:01 Substitution
Substitution Sam Baldock comes on in place of Matthew Taylor.58:42 Goal scored
Goal! - Ian Harte - West Ham 1 - 3 Reading Placed penalty scored by Ian Harte. West Ham 1-3 Reading.57:24
Penalty awarded for an unfair challenge on Noel Hunt by Abdoulaye Faye.56:17
James Tomkins takes a shot. Save by Adam Federici.54:36 Substitution
Substitution Jem Karacan goes off and Jay Tabb comes on.54:20
Shot from long range by Matthew Taylor goes wide of the left-hand post.53:38
Jason Roberts is caught offside. Danny Collins takes the free kick.52:05
Corner taken by Matthew Taylor.51:26
Jason Roberts gives away a free kick for an unfair challenge on Danny Collins. Robert Green takes the indirect free kick.45:01
The referee gets the second half started.45:01 Substitution
Substitution Danny Collins is brought on as a substitute for Mark Noble.45:00 +3:16 Half time
Half Time The match has reached half-time.45:00 +2:19
Inswinging corner taken left-footed by Matthew Taylor from the right by-line, Carlton Cole takes a shot. Blocked by Shaun Cummings.45:00 +1:10 Goal scored
Goal! - Noel Hunt - West Ham 1 - 2 Reading Noel Hunt finds the back of the net with a goal from deep inside the penalty box to the bottom left corner of the goal. West Ham 1-2 Reading.43:32
Ian Harte provided the assist for the goal.43:32 Goal scored
Goal! - Kaspars Gorkss - West Ham 1 - 1 Reading Kaspars Gorkss grabs a headed goal from close range. West Ham 1-1 Reading.43:05
Inswinging corner taken left-footed by Ian Harte from the right by-line,42:47
Jobi McAnuff takes a shot. Blocked by James Tomkins.41:39
Jason Roberts challenges Gary O'Neil unfairly and gives away a free kick. Free kick taken by Robert Green.40:34
Jason Roberts has an effort from just inside the box that misses to the left of the target.38:04
Corner taken by Jobi McAnuff from the right by-line, clearance by James Tomkins.36:50
Ricardo Vaz Te takes a shot. Alex Pearce gets a block in.35:42
Handball decision goes against Shaun Cummings. Robert Green restarts play with the free kick.34:37
Ricardo Vaz Te takes a shot. Save by Adam Federici.32:23
Inswinging corner taken by Ian Harte from the right by-line, Header from close in by Noel Hunt misses to the right of the goal.31:37
Mark Noble concedes a free kick for a foul on Jimmy Kebe. Free kick crossed by Ian Harte, Carlton Cole makes a clearance.27:50
Jason Roberts fouled by James Tomkins, the ref awards a free kick. Ian Harte restarts play with the free kick.26:20
Robert Green takes the indirect free kick.26:20 Booking
Booking Jason Roberts shown a yellow card.26:16
Unfair challenge on Abdoulaye Faye by Jason Roberts results in a free kick.23:33
Carlton Cole takes a shot. Adam Federici makes a comfortable save.22:20
Noel Hunt takes a shot. James Tomkins gets a block in.21:45
Free kick awarded for a foul by Gary O'Neil on Mikele Leigertwood. Free kick taken by Ian Harte.15:45
Unfair challenge on Jimmy Kebe by Kevin Nolan results in a free kick. Ian Harte delivers the ball from the free kick left-footed from right wing, save made by Robert Green.12:06
The referee blows for offside against Jason Roberts. Indirect free kick taken by Robert Green.7:28
Assist by Kevin Nolan.7:28 Goal scored
Goal! - Carlton Cole - West Ham 1 - 0 Reading Carlton Cole finds the back of the net with a goal from deep inside the penalty box to the bottom right corner of the goal. West Ham 1-0 Reading.6:52
Header by Kevin Nolan from inside the area strikes the post.0:00
The match has kicked off.
Live data and text provided by our data suppliers