MILLWALL were within seconds of reaching the FA Cup semi-final before Brighton equalised in the last minute of normal time and went on to win on penalties at The Den.
Jake Cooper missed Millwall's final penalty in sudden death, Lewis Dunk's spot-kick sending the Seagulls into the last four.
Millwall went 2-0 up in normal time through Alex Pearce and Aiden O'Brien before substitute Jurgen Locadia pulled a goal back in the 88th minute and Solly March levelled from a free-kick in the fifth minute of injury-time.
Shane Ferguson was sent off in the last minute of extra-time after a clash with Dunk, before penalties were needed to decide the contest.
Glenn Murray hit the crossbar with Brighton's first effort before Shaun Williams, Ryan Tunnicliffe and Ryan Leonard were successful. Locadia, March and Davy Propper scored for Brighton but Mahlon Romeo's effort was saved by Matthew Ryan.
Dale Stephens made it 4-3 and Steve Morison's penalty sent it into sudden death. Dunk fired in low past David Martin, meaning Cooper had to score but shot over.
After it was all over, Morison went to Martin with the goalkeeper on his haunches, a picture of despair. Martin will be thinking for some time about that moment late in the game when March's free-kick eluded him, but no Millwall player will be blaming the goalkeeper.
Instead there will just be a feeling of such an opportunity lost. There really wasn't any worse way to go out.
Millwall had deservedly put themselves in a winning position with 11 minutes left, two goals the fruits of a relentless determination to attack the visitors' goal in the second half.
Millwall boss Neil Harris had asked for a hero before the game, and it looked like he had a team of them, with Pearce's 70th-minute goal followed nine minutes later by O'Brien's.
That really looked to be it. Millwall, and Martin, had barely put a foot wrong but when it came down to it it was the strength of Brighton's bench that proved decisive. March and Locadia came on with 17 minutes left and rescued the game for their side before emphatically finishing their spot-kicks in front of the away end.
Millwall's substitutions naturally left them unbalanced in extra-time, but it was understandable Harris wanted to add fresh defensive energy and experience in Shaun Hutchinson and James Meredith.
After such a late blow, it looked like there would be only one winner in the extra period, with Brighton having so many attacking options on the pitch. But Millwall showed reserves of strength to fight through and give themselves the chance in the shootout.
Ultimately, and after Ferguson's dismissal denied them a regular taker, they were short of set-piece specialists and two defenders missed from 12 yards.
Almost immediately after Dunk decided it, the home fans rose to their feet to salute the effort of their side. The Den had played its part, but fortune smiled elsewhere.
Harris made two changes from the side at Birmingham, Williams – who captained the side – and 0'Brien replacing the cup-tied Ben Thompson and Ben Marshall.
With Jordan Archer not in the match-day squad, Ben Amos returned to the bench after recovering from a broken finger.
4-4-1-1: Martin; Romeo, Pearce, Cooper, Ferguson; Williams; Wallace (Hutchinson, 93), Tunnicliffe, Leonard, O'Brien (Meredith, 85); Gregory (Morison, 91).
Millwall started brightly and Jed Wallace and Lee Gregory, the latter after a clever flick, saw shots go off target.
The Lions were playing some neat football in the attacking third, confidence carrying over from their 2-0 win at Birmingham midweek.
Wallace and Williams had efforts blocked on the edge of the box but Brighton were particularly threatening on their right flank and when Anthony Knockaert got past Ferguson midfielder Tunnicliffe got back to thump the ball away.
Brighton were the first side to have a real effort on target. It was again instigated by Knockaert on the left and when Cooper's half-clearance fell to Beram Kayal on the edge of the box Martin had to see through a forest of legs to save low to his left.
Gregory went close when in one movement he turned and hooked a shot over his left shoulder but the ball just cleared the crossbar.
As the shadow from the stand crept across his goal Martin saved Kayal's header from another Knockaert cross.
Most of Millwall's attacking was coming down the right through Wallace and Romeo. They needed to find some variation but with Brighton not over-committing space was difficult to find. The visitors were also aware of Millwall's threat on the break and made sure they weren't out-numbered when the Lions won the ball back and attempted to counter-attack.
Brighton certainly didn't come to The Den with any arrogance or complacency. Gregory was closely watched by Dunk and Shane Duffy, and both sides were wary of the each other's threat at set-pieces.
Three minutes into the second half Brighton almost presented the Lions with a gift when Ryan's clearance came off Duffy and rebounded into the box. For a moment it looked like Gregory could have a tap-in, but the goalkeeper just got back in time.
Kayal broke forward from midfield after Millwall lost possession in the 57th minute and Martin had to push his shot away. Ryan then produced an even better save moments later after Gregory had slipped Wallace through on the left side of the penalty area.
In the 65th minute Wallace, Gregory and Romeo brilliantly linked up on the right before the latter found Williams but he shot straight at Ryan.
Millwall were in the ascendancy now and Ryan was rapidly off his line to save at Gregory's feet from Leonard's pass.
The Lions kept going forward and got another corner with 20 minutes left. Williams sent it to the back post, and Pearce arrived in space to thump in a header.
Brighton pressed forward looking to level, but 10 minutes from time Wallace got a break off Bernardo on the right and surged into the box. Instead of drilling in a hopeful cross Wallace waited and looked up to see O'Brien who finished at the back post.
Millwall supporters were just into a rendition of "Manchester City, we're coming for you" when Locadia brought it to an abrupt end with a fierce finish.
In the second minute of added-time, Jose Izquierdo found room on the left side of the Lions' box but Martin saved at the near post.
And with the last action of the game in normal time, March looked like he had over-hit a free-kick, but Martin, who had been faultless until then, let the ball in at the back post despite being well-positioned.
Romeo, now playing on the right side of midfield, volleyed over in the sixth minute of the first period of extra-time after Ryan had saved substitute James Meredith's low shot.
Brighton dominated the ball as Millwall went into a 5-4-1 formation, but their only chance was a shot from March at the near post that Martin saved.
In the second half Locadia picked up a loose ball in the box from a corner but his shot cleared the crossbar and then Stephens' drive with two minutes left was straight at Martin.
Ferguson was sent off for appearing to stamp on Dunk as the game went to penalties.
And Dunk had the final say for his side.
Image: Millwall FC