Scott Parker's first goal for West Ham snatched a late win over Middlesbrough at the Riverside Stadium.
Parker (centre) scored his first goal since joining West Ham
David Wheater's tap-in put Boro ahead but Dean Ashton soon levelled with a low thumped shot just before the break.
Only a fine full-stretch save by Mark Schwarzer kept out Nolberto Solano's second-half free-kick as West Ham began the second half strongly.
Both sides went for the win but late on John Pantsil set up Parker, who kept a cool head to curl home the winner.
Middlesbrough enjoyed the best of the early exchanges as West Ham struggled to impose themselves on the game, and in Tuncay Boro had the most creative and threatening player on the pitch.
West Ham's first threat came when Henri Camara sprung the offside trap and forced keeper Schwarzer to come out and hack the ball clear, but it was a rare moment of serious threat at either end.
A lacklustre first half looked likely to end goalless until a training ground move put Boro ahead.
Jonathan Spector was panicked into conceding a free-kick when he fouled Jeremie Aliadiere wide on the right.
Stuart Downing's free-kick to the far post was knocked back by Aliadiere into the path of defender Wheater, who tapped home.
But it was only a short-lived lead, as Camara's lay-off from a long ball forward found Ashton on the edge of the box, and he buried the ball in the bottom corner.
Schwarzer was called into action after the break as he kept out Solano's curling free-kick with a full-stretch save, but Boro's dangerous wingers Downing and Adam Johnson meant the home side always posed an attacking threat.
Neither side ever really dominated the match but they both tried to take all three points.
Ashton's physical presence was a constant worry to the Boro defence but when Camara limped off late on to be replaced by defender Pantsil, it looked like the visitors were happy with a draw.
But in the final minute, the replacement set up Parker, who controlled the ball well, dribbled through the defence and produced a composed finish to ensure West Ham's first win at the Riverside Stadium.
Middlesbrough manager Gareth Southgate:
"When you're not at your best you have to try and take something from the game. I think they'd settled for a draw too, they took off a striker.
"We need to see things through, and we got done by a sucker punch - we didn't defend well enough in the last couple of minutes of each half.
"When you're not flowing you've got to grind it out - we've lost a point, we've not lost three because we never looked like taking them all."
West Ham manager Alan Curbishley:
"If anything pops down in the box and Dean Ashton's coming on to it, you expect it to hit the target and hit the target hard - if he connects you know you've got a chance.
"And I've seen Scott do that before, hopefully we'll see a bit more of that from him now he's regained full fitness.
"I'm immensely frustrated by the injuries and I think fans are frustrated but they must realise we've got to take the points where we can."
Middlesbrough: Schwarzer, Young, Woodgate (Huth 63), Wheater, Pogatetz, Johnson (Cattermole 77), Boateng, Arca, Downing, Aliadiere, Sanli. Subs Not Used: Turnbull, Shawky, Lee.
Booked: Boateng, Arca.
Goals: Wheater 40.
West Ham: Green, Neill, Upson, McCartney, Spector, Solano (Noble 76), Parker, Mullins, Ljungberg, Camara (Pantsil 85), Ashton. Subs Not Used: Wright, Dailly, Ephraim.
Booked: Parker, Solano.
Goals: Ashton 44, Parker 90.
Ref: Martin Atkinson (W Yorkshire).
BBC Sport Player Rater man of the match: West Ham's Dean Ashton 8.19 (on 90 minutes).
Please note that you can still give the players marks out of 10 on BBC Sport's Player Rater after the match has finished.