Brentford were able to celebrate spot-kick salvation after Alan Judge's 30th-minute penalty proved enough to book their place in next season's Sky Bet Championship.
Almost a year after Marcello Trotta's final-day miss dramatically denied the Bees a place in the second tier, Judge kept his cool to put his side in front against play-off hopefuls Preston at Griffin Park.
Judge could even afford to miss a second penalty in the second half as his side held their nerve and results elsewhere conspired to spark wild celebrations in west London.
Brentford's promotion was partly made possible by a surprise 2-1 defeat for Leyton Orient at Crawley.
The long-time leaders of Sky Bet League One now face the agony of the play-offs after seeing their increasingly slim hopes of automatic promotion extinguished at Broadfield Stadium.
Gwion Edwards put the home side in front after 26 minutes and despite an equaliser from Chris Dagnall just before the break, Adam Drury's 70th-minute header won it for the hosts.
And Brentford's promotion was finally rubber-stamped when the final whistle blew on an extraordinary game between Wolves and Rotherham at Molineux.
In a match delayed by 10 minutes as a crowd of 30,110 flocked to the home side's promotion party, both Wolves' Nouha Dicko and Rotherham's Kieran Agard hit hat-tricks before Wolves ran out 6-4 winners.
Agard's 14th-minute opener was cancelled out by Dicko, who hit a second while David Edwards added a third to give the home side a comfortable half-time advantage.
Agard reduced the deficit on the hour and although Dicko restored Wolves' two-goal cushion with 10 minutes remaining, the match was far from over.
Desperate for the points to boost their own play-off push, the Millers hit back through Joe Skarz on 84 minutes before Agard fashioned an equaliser four minutes later - but there was still time for Sam Ricketts and Kevin McDonald to seal an incredible win for Wolves, and wrap up Brentford's promotion in the process.
A dramatic injury-time winner from Michael Smith kept Swindon's faint play-off hopes alive as their 2-1 win at Coventry moved them within four points of the top six.
Alex Pritchard gave Swindon an eighth minute lead and although John Fleck's equaliser threatened to all but kill off their hopes, Smith's last-gasp strike kept hope intact.
At the bottom, Crewe took advantage of slip-ups from two of their relegation rivals to jump two points clear of the drop zone with an emphatic 3-1 win at Shrewsbury.
Mathias Pogba, Uche Ikpeazu and Anthony Grant sent the Railwaymen towards victory before Tom Bradford scored an injury-time consolation for the hosts.
Carlisle's hopes of clambering away from the bottom four were hit by Michael Ngoo's late equaliser for Walsall at Brunton Park. Liam Noble scored early but the Cumbrians were forced to settle for a 1-1 draw.
And there was also frustration for Notts County who fell to a 2-1 defeat at Bristol City. Two strikes from Sam Baldock sandwiched a 29th-minute Haydn Hollis header for the visitors.
Connor Brown's goal on the stroke of half-time helped Oldham ease relegation fears with a 1-0 win at Colchester, while Gillingham also took a big step to safety as Bradley Dack and Cody McDonald scored late in a 2-0 win over Tranmere.
Jordan Hugill scored the only goal of the game as Port Vale edged to a 1-0 win over MK Dons.
Sheffield United kept their slim play-off hopes alive with a 1-0 victory over Stevenage after John Mousinho's early own goal proved to be decisive.
The result leaves Stevenage rooted to the foot of the table, seven points from safety with three games to play.