Manchester United's first game since the death of former great George Best saw their new hero Wayne Rooney inspire them to a deserved victory at West Ham.
United went behind after just 52 seconds when Marlon Harewood clinically sidefooted in a low cross.
But United created plenty of chances and equalised when striker Rooney cut inside a defender before powering home.
Rooney then provided the corner for John O'Shea's headed winner which lifts United to second in the Premiership.
There were some poignant scenes before kick-off as West Ham hero Sir Trevor Brooking and United legend Sir Bobby Charlton gave their thoughts on the late George Best.
Fans at Upton Park then paid tribute with a minute's applause in honour of football legend Best who died on Friday.
But the Hammers stunned the visitors with a goal in the first minute after robbing United striker Ruud van Nistelrooy of possession.
Teddy Sheringham's deft header then released Matthew Etherington down the left flank and his inviting angled low ball into the United area was emphatically dispatched by Harewood.
Sir Alex Ferguson's side kept their calm and twice pierced the Hammers defence only to be denied an equaliser by former goalkeeper Roy Carroll.
Carroll saved low to his left from Van Nistelrooy before pulling off an even better save by diving low to his left to palm away an angled Paul Scholes drive.
West Ham were in danger of sitting back and, after going close when Yossi Benayoun's goalbound free-kick was deflected wide, the home side had Carroll to thank again when he saved from Rooney.
United looked more secure after substituting Mikael Silvestre with Gary Neville and the Hammers' resistance was quickly broken after the break when Rooney skilfully equalised.
The 20-year-old controlled a Ji-Sung Park pass with his right foot, cut inside a defender with his left and his third touch saw him shoot home with his right.
Only some desperate defending and Rooney's failure to time a shot stopped him quickly adding a second.
But the irrepressible United star provided the corner from which O'Shea headed in to give the visitors a deserved lead.
Van Nistelrooy struck the crossbar with a clever chip as United moved 10 points behind leaders Chelsea.
West Ham boss Alan Pardew:
"We came up against a team that was very focused on doing a job with some outstanding players.
"We had some outstanding performances to lead at half-time but the quick goal knocked a bit out of us. Then we saw the real power of Manchester United.
"We worked hard and made them play to their maximum so I can't ask for any more. They gave everything they had."
Manchester United manager Sir Alex Ferguson:
"I was very pleased with the performance.
"I knew all the comparisons with George Best were going to be coming out and quite rightly, but that's the kind of club we are anyway.
"We owe a big thanks to the West Ham fans. The one lucky thing we have that we came to a football club that appreciates great football players, and the minute's applause epitomised the sporting love between two great football clubs.
"People might make comparisons with Wayne Rooney, but Wayne is only 20 - what I will say is that he is the best young player I've seen in my time.
"I told the players at half-time that it was next goal the winner, and fortunately it went to us."
West Ham: Carroll, Repka, Ferdinand, Gabbidon, Konchesky, Benayoun, Noble, Mullins (Zamora 72), Etherington (Newton 89), Harewood, Sheringham (Dailly 71).
Subs Not Used: Hislop, Aliadiere.
Booked: Noble, Sheringham.
Goals: Harewood 2.
Man Utd: Van der Sar, Brown, Ferdinand, Silvestre (Neville 37), O'Shea, Fletcher, Smith, Scholes, Park, Rooney, van Nistelrooy (Richardson 90).
Subs Not Used: Howard, Ronaldo, Saha.
Booked: Silvestre, van Nistelrooy, Rooney.
Goals: Rooney 47, O'Shea 56.
Ref: S Bennett (Kent).