Match ends, Millwall 2(4), Brighton and Hove Albion 2(5).
Brighton came from two goals down with two minutes left before beating 10-man Millwall on penalties to reach their first FA Cup semi-final since 1983.
Millwall led with second-half goals from Alex Pearce and Aiden O'Brien.
Jurgen Locadia made it 2-1 before Solly March levelled with a stoppage-time free-kick after a mistake by keeper David Martin.
Millwall's Shane Ferguson was sent off in extra time, and Jake Cooper's miss gave Brighton a 5-4 shootout win.
Brighton's Glenn Murray hit the bar with the first penalty of the shootout, but Seagulls' keeper Mat Ryan saved Mahlon Romeo's spot-kick with his foot to give his side hope.
Lewis Dunk converted the first of the sudden death penalties. before Cooper put his attempt over the bar to hand victory to the Premier League side.
Brighton felt they should have had a penalty for a push on Shane Duffy late in the first half, and Murray appeared to have been pushed over in the build-up to Pearce's opener, but there was no video assistant referee in operation to check either call.
Millwall had stepped up after a lacklustre first half and were close to making the last four for the first time since 2013, when they lost to eventual winners Wigan Athletic.
Ferguson was shown a straight red card late in extra time after bringing his boot down the back of Duffy's leg, and Locadia had the ball in the Millwall net with seconds remaining but the Brighton substitute was flagged for offside.
Video replays showed that that Martin Montoya was just onside as the ball was played to him before his pass to Locadia, but in the end the decision did not matter with Brighton winning through to a semi-final at Wembley against Manchester City.
Hughton's substitutions prove vital
With two consecutive wins in the league easing fears over Brighton's top-flight status, Chris Hughton's attitude towards the competition he won twice as a player was shown by the strong side that he named.
However, the Brighton manager's substitutions proved to be vital, with the extra energy from Locadia, March and Jose Izquierdo helping to give their side momentum after they had fallen 2-0 behind.
It had taken a long time for Brighton to assert themselves, and Baram Kayal's shot just before the half-hour was their first effort on target.
Kayal had a better chance with a header that Martin saved low to his right before the break, but Brighton stalled in the second half when faced with a much-improved Millwall side.
Locadia's shot on the turn gave Brighton hope, and then a dreadful error from Martin, who allowed March's free kick to go through his hands while under no pressure at all, put the game into the extra half-hour.
Ryan's excellent save low to his left denied James Meredith early in extra time, and despite a wrong offside call that thwarted Locadia, Brighton held their nerve to see the club into the FA Cup's last four for the first time since they finished as runners-up to Manchester United in a replayed final 36 years ago.
Heartbreak for Millwall
With five consecutive wins over Premier League sides at The Den in this competition, Millwall were a tough proposition for Brighton.
And despite their struggles in the Championship, they looked like a side who deserved their reputation at home for much of normal time.
They started energetically before fading in the first half, but they were much the better side after the break, with the appalling weather and the noisy home support also helping Neil Harris' side go so close to a famous win.
But lapses of concentration in defence and by their keeper in the final minutes proved to be vital.
Even so, Meredith was close to giving the hosts the lead again from open play, and they held the advantage for the opening stages of the shootout.
However, Ryan's save from Romeo and Cooper's crucial miss left Millwall to rue their missed opportunity.
'Huge frustration' - what the managers said
Millwall manager Neil Harris: "I thought the players were outstanding. What a performance for 94 minutes.
"I am a little more disappointed with the first goal. The second was an individual error. David Martin is one of the best pros I have come across. He is a great lad, so popular. He deserved his opportunity to come into the team last week. He was outstanding for the whole game barring one moment. That is football.
"I am a big believer of whoever misses the first penalty wins the shootout. I wasn't confident. Shane Ferguson is our best penalty taker and wasn't on the pitch because of a moment of stupidity. The players put themselves forward so I have no problems with them missing at all.
"I am frustrated. Missing the chance to lead the team in an FA Cup semi-final is a huge frustration for myself, staff, players and fans."
Brighton manager Chris Hughton: "I think that was what you call a proper cup tie. I didn't think we did well enough in the early part of the game. This is a very difficult place and they have history in this competition, but it's about character and we had a group of players that decided they desperately wanted to stay in this competition."
On the equaliser: "As soon as Solly [March] played the ball in, we were disappointed because he over hit it but sometimes you need those moments. We probably didn't create enough of them but we had a bit of fortune to swing it our way.
"We were confident in the penalty shootout, but when you miss the first one and they score, you think it may not be your day. But we showed enough with our remaining takers and I think we showed more over the 90 minutes."
Man of the match - Solly March (Brighton)
Party like it's 1983 - the key stats
- Brighton have qualified for an FA Cup semi-final for the second time in their history - previously doing so in 1983 when they finished as runners-up.
- They are just the third side to reach the FA Cup semi-final stage after winning a quarter-final on penalties - after Sheffield United (1993 and 1998) and Arsenal (1998).
- Brighton have won eight of their past nine penalty shootouts in all competitions, winning each of their past three in the FA Cup.
- Millwall have lost seven of their past eight penalty shootouts, including their past two in the FA Cup.
- The Lions are winless in five home games in all competitions (D3 L2), their longest run without a win at tTe Den in a single season since March 2015 (13 games).
- Millwall's first seven goals in the FA Cup this season came from set-pieces (four free-kicks, three corners), with Aiden O'Brien's goal the first from open play.
- Jed Wallace has either scored or assisted in each of his four FA Cup games for Millwall at The Den (one goal, three assists).
- Jurgen Locadia's goal was his first in 19 away games in all competitions for Brighton, with his other five coming at the Amex Stadium.
- 11FergusonBooked at 119mins
- 7J WallaceSubstituted forHutchinsonat 90+3'minutes
- 22O'BrienSubstituted forMeredithat 85'minutes
- 9GregorySubstituted forMorisonat 90+1'minutes
- 22MontoyaBooked at 69mins
- 30BernardoBooked at 35mins
- 7KayalSubstituted forIzquierdoat 73'minutes
- 11KnockaertSubstituted forLocadiaat 73'minutes
- 16JahanbakhshSubstituted forMarchat 67'minutes
- Chris Kavanagh
- Shots on Target
Penalty Shootout ends, Millwall 2(4), Brighton and Hove Albion 2(5).
Penalty missed! Bad penalty by Jake Cooper (Millwall) left footed shot is just a bit too high. Jake Cooper should be disappointed.
Goal! Millwall 2(4), Brighton and Hove Albion 2(5). Lewis Dunk (Brighton and Hove Albion) converts the penalty with a right footed shot to the bottom left corner.
Goal! Millwall 2(4), Brighton and Hove Albion 2(4). Steve Morison (Millwall) converts the penalty with a right footed shot to the top right corner.
Goal! Millwall 2(3), Brighton and Hove Albion 2(4). Dale Stephens (Brighton and Hove Albion) converts the penalty with a right footed shot to the bottom left corner.
Penalty saved! Mahlon Romeo (Millwall) fails to capitalise on this great opportunity, right footed shot saved in the bottom right corner.
Goal! Millwall 2(3), Brighton and Hove Albion 2(3). Davy Pröpper (Brighton and Hove Albion) converts the penalty with a right footed shot to the top left corner.
Goal! Millwall 2(3), Brighton and Hove Albion 2(2). Ryan Leonard (Millwall) converts the penalty with a right footed shot to the bottom left corner.
Goal! Millwall 2(2), Brighton and Hove Albion 2(2). Solly March (Brighton and Hove Albion) converts the penalty with a left footed shot to the top right corner.
Goal! Millwall 2(2), Brighton and Hove Albion 2(1). Ryan Tunnicliffe (Millwall) converts the penalty with a right footed shot to the top left corner.
Goal! Millwall 2(1), Brighton and Hove Albion 2(1). Jürgen Locadia (Brighton and Hove Albion) converts the penalty with a right footed shot to the bottom left corner.
Goal! Millwall 2(1), Brighton and Hove Albion 2. Shaun Williams (Millwall) converts the penalty with a left footed shot to the bottom left corner.
Penalty missed! Still Millwall 2, Brighton and Hove Albion 2. Glenn Murray (Brighton and Hove Albion) hits the bar with a right footed shot.
Penalty Shootout begins Millwall 2, Brighton and Hove Albion 2.
Second Half Extra Time ends, Millwall 2, Brighton and Hove Albion 2.
Offside, Brighton and Hove Albion. Dale Stephens tries a through ball, but Martín Montoya is caught offside.
Shane Ferguson (Millwall) is shown the red card for violent conduct.
Lewis Dunk (Brighton and Hove Albion) wins a free kick in the defensive half.
Foul by Shane Ferguson (Millwall).