Headers from Michail Antonio and Winston Reid secured a 3-2 victory for the Hammers.
West Ham came from behind to beat Manchester United in the final game to be played at Upton Park on this day in 2016.
Headers from Michail Antonio and Winston Reid secured a 3-2 victory for the Hammers as they bade farewell to their home of 112 years ahead of their move to the London Stadium.
Diafra Sakho had given the hosts the lead until Anthony Martial put United ahead with a second-half brace.
The occasion was marred before kick-off when bottles were thrown at the Manchester United coach as it made its way into the ground.
The Metropolitan Police confirmed a police officer and a member of the public were hurt, with the Football Association launching an investigation.
Kick-off was delayed by 45 minutes but West Ham were quickly out of the blocks and, although the Red Devils rallied after the break, Hammers boss Slaven Bilic ultimately saw his team win and severely dent United’s hopes of Champions League qualification.
“It’s a great night,” Bilic said. “It’s our history and it’s not just a game. It’s against them, (United) it’s fighting for Europe and everything, a late night game – it couldn’t be better.
“All the boxes you need to have a special kind of a game, it was tonight. All the boxes were there, Man United, late night, thriller, five goals, so brilliant.”
Manchester United manager Louis van Gaal refused to blame the pre-match attack on the club coach as a reason for his side’s defeat.
“First of all you cannot prove that (it had an effect),” he said.
“It will have an influence but I don’t think we have to look for excuses because we chased the match in the second half and 20 minutes before full-time we are ahead so I don’t think you have to look for that excuse.”