Match ends, Blackburn Rovers 1, West Ham United 5.
Dimitri Payet produced a virtuoso performance as West Ham fought back to ease into the FA Cup quarter-finals at Championship side Blackburn.
The home team took the lead when right-back Ben Marshall tucked in a low shot.
Victor Moses's equaliser squirmed in and Payet's free-kick put West Ham ahead before Blackburn were reduced to 10 men by Chris Taylor's red card.
Emmanuel Emenike converted twice either side of Cheikhou Kouyate's dismissal, then Payet added a superb solo goal.
The Hammers, who last won the FA Cup in 1980, will travel to either Shrewsbury or Manchester United in the last eight.
It is only the second time in the past 10 seasons that they have reached the quarter-finals.
Read how the action unfolded at Ewood Park
Can the Hammers end their trophy drought?
West Ham have not won a major trophy for 36 years but, in their final season at the Boleyn Ground, are hoping that they can take the FA Cup with them to the Olympic Stadium.
Hammers manager Slaven Bilic has previously said he would rather win the trophy than finish in the Premier League top four, and he showed his intent by picking a near full-strength side against the Championship strugglers.
And, despite that brief early scare after Marshall's opener, the visitors never looked like becoming the victim of a cup upset.
Backed by over 7,000 travelling supporters, they quickly grew into the game as their superior quality shone through.
The Hammers, who had won just one of their previous 10 away matches, completely controlled the tie after Taylor's dismissal, with Blackburn constantly stretched by their pace and sharp movement.
"The sending-off was completely needless and changed the course of the game," said BBC Radio 5 live summariser Mark Lawrenson.
"I'm not saying West Ham wouldn't have won but they wouldn't have won so easily."

Payet steals the show... again
France attacking midfielder Payet has been the star of West Ham's season, impressing plenty of observers since his summer move from Marseille with his vision, poise and technical ability.
The 28-year-old showed again why he is pivotal to the Hammers' hopes of winning the FA Cup with a masterful performance at Ewood Park.
He put the visitors ahead with a trademark free-kick, arcing the ball over the Rovers wall from almost 30 yards and into the corner.
Not for the first time this season, Payet was not always constantly involved in the game - but it is his ability to burst into life with devastating effect which is so impressive.
In the final stages, his precise throughball teed up Emenike's second goal before sealing the match with a wonderful solo run and finish.
Payet has now been involved in 17 goals in all competitions for the Hammers since his arrival, scoring nine goals and providing eight assists.
No wonder Hammers boss Bilic, who was warmly embraced by Payet on the touchline after his first goal, was so pleased to tie him down to an improved contract.
"Dimitri is one of the very best, in terms of the players that I've played with and coached. He is up there with Luka Modric," said Bilic afterwards.
READ MORE: Bilic wants to write poetry about Payet
Back to Championship survival for Blackburn
Blackburn, who are sixth bottom in the Championship, are understandably prioritising safety over a run into the latter stages of the FA Cup, with Lambert insisting he did not want a replay because of the knock-on effect on his side's schedule.
And he was granted his wish by some dismal defending.
Despite their lowly league position, Rovers have only conceded 27 goals in 30 matches but were the architects of their downfall against the Hammers.
The home defence retreated as Moses ran forward to score the equaliser, with not one Blackburn player attempting to stop the on-loan Chelsea winger.

Steele did not cover himself in glory either, looking understandably upset with himself for not making a seemingly simple save.
Rovers started both halves impressively, playing at a high tempo and trying to push back their Premier League opponents.
But once Taylor received his second yellow card - the first for tripping Payet, who then scored from the free-kick, and another for needlessly clipping Moses - they were totally outclassed as the Hammers ran riot.
Man of the match - Dimitri Payet

Post-match reaction
Blackburn manager Paul Lambert:
"I thought for 55 minutes we were very good and well in the game.
"Their first goal I thought Jason Steele should save, then the sending-off kills us. It opens the game up. It's hard enough against 11 let alone 10."
West Ham manager Slaven Bilic:
"We played some fantastic football. It was down to team work and we were solid.
"We passed the ball and the only way to kill them was penetrate them when we could. In those situations we have pace in Emenike, Moses, Antonio and Cresswell, with Payet and Lanzini who can get the ball in.
"It looked easier than we thought but it was us who made it easier."
What's next?
Back to league action for both teams.
West Ham, who are seventh in the Premier League and chasing European qualification, host relegation-threatened Sunderland on Saturday.
But Blackburn only have three days to recover, going to high-flying Derby on Wednesday as they aim to extend their eight-point gap on the relegation zone.
Have you added News Alerts in the BBC Sport app? Simply head to the My Alerts menu in the app - and don't forget you can also add score alerts for your favourite football team, the Six Nations, and more.
Line-ups
Blackburn
Formation 4-2-3-1
- 30Steele
- 10Marshall
- 22Duffy
- 15Ward
- 2Henley
- 21Akpan
- 26LenihanBooked at 84mins
- 19TaylorBooked at 55mins
- 31Bennett
- 32ConwaySubstituted forJacksonat 59'minutes
- 9BrownSubstituted forWattat 78'minutes
Substitutes
- 4Kilgallon
- 5Hanley
- 8Watt
- 14Gomez Garcia-Penche
- 29Evans
- 33Raya
- 35Jackson
West Ham
Formation 4-3-3
- 1Randolph
- 30Antonio
- 19Collins
- 21OgbonnaSubstituted forOxfordat 78'minutes
- 3Cresswell
- 16NobleSubstituted forSongat 73'minutes
- 8KouyatéBooked at 75mins
- 14ObiangSubstituted forLanziniat 67'minutes
- 20Moses
- 29Emenike
- 27Payet
Substitutes
- 4Song
- 13Adrián
- 25Henry
- 28Lanzini
- 35Oxford
- 40Parfitt-Williams
- 41Browne
- Referee:
- Jonathan Moss
- Attendance:
- 18,793
Match Stats
- Possession
- Home33%
- Away67%
- Shots
- Home11
- Away23
- Shots on Target
- Home4
- Away14
- Corners
- Home3
- Away5
- Fouls
- Home16
- Away6
Live Text
Post update
Full Time
Second Half ends, Blackburn Rovers 1, West Ham United 5.
Goal!
Goal! Blackburn Rovers 1, West Ham United 5. Dimitri Payet (West Ham United) right footed shot from the centre of the box to the bottom left corner. Assisted by Manuel Lanzini.
Post update
Offside, West Ham United. Victor Moses tries a through ball, but Emmanuel Emenike is caught offside.
Post update
Attempt saved. Victor Moses (West Ham United) header from the centre of the box is saved in the top right corner. Assisted by Michail Antonio with a cross.
Post update
Attempt missed. Michail Antonio (West Ham United) right footed shot from the right side of the box misses to the left. Assisted by Victor Moses.
Post update
Emmanuel Emenike (West Ham United) hits the right post with a right footed shot from the centre of the box. Assisted by Dimitri Payet.
Post update
Attempt blocked. Tony Watt (Blackburn Rovers) right footed shot from outside the box is blocked. Assisted by Shane Duffy.
Goal!
Goal! Blackburn Rovers 1, West Ham United 4. Emmanuel Emenike (West Ham United) right footed shot from the centre of the box to the bottom right corner. Assisted by Dimitri Payet.
Booking
Darragh Lenihan (Blackburn Rovers) is shown the yellow card for a bad foul.
Post update
James Collins (West Ham United) wins a free kick in the defensive half.
Post update
Foul by Darragh Lenihan (Blackburn Rovers).
Post update
Manuel Lanzini (West Ham United) wins a free kick in the attacking half.
Post update
Foul by Elliott Bennett (Blackburn Rovers).
Post update
Corner, West Ham United. Conceded by Shane Duffy.
Post update
Attempt blocked. Victor Moses (West Ham United) right footed shot from the left side of the six yard box is blocked.
Post update
Attempt saved. Victor Moses (West Ham United) right footed shot from the centre of the box is saved in the centre of the goal. Assisted by Michail Antonio.
Post update
Aaron Cresswell (West Ham United) wins a free kick in the defensive half.
Post update
Foul by Elliott Bennett (Blackburn Rovers).
Post update
Attempt missed. Emmanuel Emenike (West Ham United) right footed shot from very close range misses to the right. Assisted by Aaron Cresswell.