Brighton twice came from behind to defeat Dagenham & Redbridge and secure promotion to English football's second tier after a five-year absence.
Dagenham took the lead inside a minute through John Akinde, before two goals in as many minutes from Inigo Calderon and Glenn Murray sent Albion in front.
However a Jon Nurse goal and Danny Green's penalty put Dagenham 3-2 up.
But Liam Bridcutt then pulled Brighton level, before Ashley Barnes' 63rd-minute header sealed a remarkable win.
Albion's promotion is the first of Gus Poyet's managerial career and comes towards the end of Brighton's final season at the Withdean Stadium before they move to their new ground at Falmer.
Top of the table since late September, Brighton have not lost at home all season in the league and have won 10 of their last 11 fixtures to banish any thoughts of a nervous finish to their impressive campaign.
Tuesday's win sent them 16 points clear at the top of the division and Brighton can now clinch the League One title at Walsall on Saturday.
However, any thoughts of a comfortable victory against relegation-threatened Dagenham were quickly dispelled when Akinde's shot deflected beyond the helpless Casper Ankergren as the visiting side underlined their intention to spoil Albion's promotion party.
Having conceded just once in their previous four home fixtures, Brighton appeared momentarily stunned, while the expectant home fans were silenced.
Albion increased the tempo and started to pick holes in the Daggers defence, with Tony Roberts brilliantly tipping over a strike from Craig Noone while a long-range effort from Chris Wood smashed against the crossbar.
Soon afterwards full-back Calderon stabbed home a corner flicked on by Adam El-Abd to pull Brighton level.
A minute later, Murray headed home a cross from Noone despite the best efforts of Daggers defender Scott Doe to clear the ball off the line.
Poyet's team were suddenly in complete control, cutting open their opponents at will, but the pace of the game then dropped, allowing the visitors to gradually force their way back into the contest.
Ankergren saved superbly from a couple of Akinde efforts, while Romain Vincelot's effort from inside a congested penalty area flew over the crossbar as Daggers finished the half on top.
The away team's reward for their efforts came after the break when they scored twice in three minutes to once again turn the match on its head.
Nurse's strike deflected off Calderon and beyond Ankergren before El-Abd clumsily brought down Akinde, resulting in a penalty that Green slotted low into the bottom corner.
For the second time in the match, the vast majority of the crowd were stunned into silence but they were soon given encouragement when a Murray header struck the crossbar.
Bridcutt then equalised with a rasping strike that flew into the top corner before substitute Barnes headed home an Elliott Bennett corner with just about his first touch to put Albion 4-3 ahead.
Brighton still had to survive some anxious moments, notably a Green free-kick that Ankergren saved while Mark Arber's lob drifted wide.
But Poyet's side held on to become the first Football League team to secure promotion this season in the final evening match to be played at the Withdean Stadium.