Luton have been promoted to the Sky Bet Championship after Portsmouth and Sunderland were both beaten on Tuesday night.
Pompey, who were looking to close the gap on the second-placed Tykes to a single point going into the final day on Saturday, fell two goals behind at home to Peterborough.
Lee Tomlin swept in his first goal since January and Ivan Toney powered in a header to double Posh's lead.
At Highbury Stadium, Sunderland went ahead through Lee Cattermole's header from a corner, but Paddy Madden slotted home an equaliser before Ashley Eastham slammed in a last-gasp winner.
😲 91 points
— Sporting Life Football (@SportingLifeFC) April 30, 2019
⚽️ 87 goals scored
💪 26 wins
LUTON TOWN ARE PROMOTED TO THE SKY BET CHAMPIONSHIP! 🍾
Congratulations @LutonTown! 👏#COYH #LTFC pic.twitter.com/h8pQkscbUc
In a video posted on Twitter, Luton boss Mick Harford said: "Congratulations everyone, I'd like to send a big message to all the Luton Town fans, all the fans who have travelled for miles throughout this season and got their just rewards.
"Your support has been immense and without it, we wouldn't have got over the line.
"I'd like to also send a message to all the players, the players this season have been absolutely magnificent from the first game to the last game, which will be on Saturday where the Kenilworth Road will be rocking.
"And I'd also love to send a message to the board and 2020 and the consortium, with their support, things have been immense.
"I'd also like to send a message to Luton Borough Council, thank you for the planning application, Luton Town are going up, we are going up."
What a group of players! #WeAreGoingUp #COYH pic.twitter.com/EYFEBCKiaK
— Mick Harford (@Mickharford) April 30, 2019