Match ends, West Ham United 1, Manchester United 2.
Manchester United will face Everton in the FA Cup semi-final at Wembley after showing class and then character to beat West Ham United.
In the final FA Cup game at Upton Park before the Hammers move to the Olympic Stadium, visiting manager Louis van Gaal once again engineered a result when he needed it most.
Marcus Rashford gave Van Gaal's men the lead in this quarter-final replay after 54 minutes, the 18-year-old collecting a pass from Anthony Martial before curling a magnificent finish into the top corner past West Ham keeper Darren Randolph.
And when Marouane Fellaini bundled in Martial's cross 13 minutes later it looked all over - only for West Ham to mount a fierce siege in the closing minutes.
Visiting keeper David de Gea, who gave a virtuoso display, had already saved superbly from Michail Antonio when James Tomkins stooped bravely among flying footwear to head in and give West Ham hope with 11 minutes left.
The hosts finally hammered at Manchester United's defence with De Gea saving once more from Andy Carroll and Cheikhou Kouyate, the latter ruled narrowly offside as he headed in a rebound.
With Wayne Rooney coming on for the final four minutes in his first appearance in two months after a knee injury, it ended as a very satisfactory night for Van Gaal and his side.
Van Gaal's high-wire act on show again
Manchester United defender Phil Jones described this tie as a "defining moment" in their season - and manager Van Gaal has had plenty of those as he has been surrounded by speculation about his future.
And in this managerial high-wire act, Van Gaal has always seemed able to steady a stumble by pulling out a result when he needed it most.
Van Gaal has fought off his critics with crucial wins at Liverpool and Manchester City as well as progressing in the FA Cup - and the heat was on again here after the comprehensive 3-0 loss at Tottenham on Sunday and more reports of player unrest at his methods.
There was no sign of discord here in a performance that showed control for the first 70 minutes and grit for the last 20 to send United to Wembley and offer Van Gaal the chance to answer his critics with a trophy.
Manchester United's young guns lead the way
De Gea will rightly take the plaudits for another display of the kind that has offered his side some respite in their darkest moments - but Van Gaal's willingness to risk young talent paid a rich dividend here.
Youngster Rashford was replaced at half-time at White Hart Lane, his manager unhappy with his performance, but he produced the moment of class that shifted the emphasis and momentum in United's favour here.
As he did when scoring the winner at Manchester City, Rashford showed a clinical edge and natural talent to score that wonderful opener.
And in defence, Timothy Fosu-Mensah showed tremendous maturity, a tower of strength when the Red Devils needed him most. He was powerful in the air and in the tackle.
Manchester United have had their difficulties, but in these two 18-year-olds and Martial they have talent they can build around.
West Ham suffer stage fright
There has been a feeling around the Boleyn Ground that West Ham's name was on the FA Cup this season as they pursued silverware in their last season at the stadium.
Maybe there was a touch of complacency in feeling they had done the hard part with the 1-1 draw at Old Trafford - or perhaps nerves that the dream might be coming close to reality.
Whatever the reason, it was not until the last 15 minutes that they actually started playing to their strengths, using Carroll and bombarding their opponents.
Even then, with the visitors on the rack, their decision-making was poor on a night that will be a bitter disappointment to manager Slaven Bilic, his players and everyone at the club.
In the closing moments, with Carroll winning everything in the air, they tried an elaborate corner routine that ended with captain Mark Noble shooting yards off target.
The last hope had gone, as had their chances of winning the FA Cup. The subdued reaction from the home fans told the story.
Man of the match - David de Gea
The stats you need to know
- Manchester United have reached the FA Cup semi-final for the first time since 2011.
- Since making his Manchester United debut in February, Marcus Rashford has scored six times in 11 games. No other United player has scored more than three goals in that time.
- Only Juan Mata (8) has more assists in all competitions for Manchester United this season than Anthony Martial (6).
- Marouane Fellaini scored his first goal for Manchester United since December, ending a run of 12 games without scoring.
- West Ham are now winless in 12 games in all competitions against the Red Devils (D5 L7).
Both clubs still have hopes of a top-four Premier League finish. Manchester United host Aston Villa on Saturday, while West Ham visit Leicester on Sunday. Manchester United's FA Cup semi-final against Everton at Wembley is on Saturday, 23 April.
- 11E ValenciaSubstituted forMosesat 62'minutes
- 28LanziniSubstituted forEmenikeat 74'minutes
- 9CarrollBooked at 45mins
- 1de Gea
- 5RojoBooked at 45minsSubstituted forA Valenciaat 68'minutes
- 16CarrickBooked at 26mins
- 21HerreraBooked at 74minsSubstituted forSchneiderlinat 76'minutes
- 39RashfordSubstituted forRooneyat 90'minutes
- 25A Valencia
- Roger East
- Shots on Target
Second Half ends, West Ham United 1, Manchester United 2.
Foul by Marouane Fellaini (Manchester United).
Angelo Ogbonna (West Ham United) wins a free kick in the defensive half.
Attempt missed. Mark Noble (West Ham United) right footed shot from outside the box misses to the left. Assisted by Dimitri Payet following a corner.
Corner, West Ham United. Conceded by Morgan Schneiderlin.
Attempt blocked. Dimitri Payet (West Ham United) right footed shot from outside the box is blocked.
Foul by Jesse Lingard (Manchester United).
Dimitri Payet (West Ham United) wins a free kick in the attacking half.
Substitution, Manchester United. Wayne Rooney replaces Marcus Rashford.
Offside, West Ham United. Andy Carroll tries a through ball, but Cheikhou Kouyaté is caught offside.
Attempt saved. Andy Carroll (West Ham United) left footed shot from outside the box is saved in the centre of the goal.
Attempt saved. Cheikhou Kouyaté (West Ham United) left footed shot from the centre of the box is saved in the centre of the goal.
Attempt missed. Andy Carroll (West Ham United) header from the centre of the box is just a bit too high. Assisted by Aaron Cresswell with a cross.
Jesse Lingard (Manchester United) wins a free kick on the right wing.
Foul by Cheikhou Kouyaté (West Ham United).
Anthony Martial (Manchester United) wins a free kick on the right wing.
Foul by Angelo Ogbonna (West Ham United).
Attempt missed. Emmanuel Emenike (West Ham United) right footed shot from the right side of the box is high and wide to the right. Assisted by Victor Moses with a headed pass.
Foul by Morgan Schneiderlin (Manchester United).