Bolton Wanderers secured their place in the League One play-off final, despite losing 3-2 to Barnsley in their semi-final second leg.
Bolton had looked almost certain to book their spot at Wembley when, having won the first leg 3-1 at Oakwell, they recovered from going behind at home to lead 5-2 on aggregate at half-time.
Wanderers striker Aaron Collins had found the net from 25 yards to cancel out Sam Cosgrove's close-range header, before Eoin Toal nodded in from a corner to establish a three-goal cushion.
However, a deflected strike from Adam Phillips and another Cosgrove header brought Barnsley back within one goal of forcing extra time.
The Tykes pushed for an equaliser in the tie late on, with chances falling in the box to Mael de Gevigney and Cosgrove, but they fell short of a second successive appearance in the third-tier play-off final.
Instead it will be Ian Evatt's side, who finished third in League One, that will face either Oxford United or Peterborough United for a place in the Championship on Saturday, 18 May.
Oxford will take a one-goal advantage into the second leg of their semi-final on Wednesday.
Bolton one win from Championship return
When Bolton last played at Championship level in 2019, they were about to go into administration and the very existence of the club was under threat.
Despite a takeover being completed early in the following campaign, a second successive relegation could not be avoided.
Since then, Evatt has presided over an upturn in fortunes, first leading Wanderers to promotion from League Two in 2021 and winning the EFL Trophy two years later.
They were in the mix for automatic promotion for much of this season and the signing of Collins from fellow League One club Bristol Rovers helped to provide fresh momentum in the second half of the campaign - his first-half strike was his seventh goal in his past eight appearances.
Scores of Bolton supporters flooded on to the pitch at the conclusion of a second leg which proved to be more nervy than they would have hoped, but they can now prepare to watch their side appear in an English Football League play-off final for the first time since 2001.
Tykes fall short despite brave fightback
As for Barnsley, their win was a first success in eight games - but a season which began with a 7-0 home thrashing of Port Vale in August has ended with them contemplating a third successive year in England's third tier.
That stuttering finale to the campaign resulted in head coach Neill Collins being sacked before the club's final league match.
Interim boss Martin Devaney stepped in to take charge and, following Barnsley's first-leg defeat, he pointed to Sheffield Wednesday's miraculous semi-final comeback against Peterborough last season as proof that the two-goal deficit could be overturned.
Second-half goals from Phillips and Cosgrove, who also had an early penalty appeal turned down, gave the visitors hope of an astonishing turnaround.
However, Bolton repelled their late pressure to avenge their loss to the Tykes at the same stage of last season's League One play-offs.
Post-match reaction
Bolton manager Ian Evatt told BBC Radio Manchester:
[On the finish to the game] "It was one of the most unenjoyable 15 minutes of my life, it was crazy.
"But over the two legs, we deserve it. For large parts of today, we had complete control. We played really well in the first half, got ourselves in front and deservedly so.
"The second half was just meandering into nothing, we dealt with the first 15 minutes.
"Just a little bit of game management, just being more focused and more professional, and [having] almost over-confidence because we felt like we had the job done - it gifted them some momentum with the equaliser and then we've had to hang on for dear life. Credit to them, they were excellent.
"We're not going to over-celebrate, we've got one more game to go and a big job to do before we can start to even think about celebration."
Barnsley interim boss Martin Devaney told BBC Radio Sheffield:
"The lads did well, they fought really hard and showed that passion and fight.
"Going 2-1 down at half-time was disappointing but we spoke about character and resilience, and they certainly showed that in the second half.
"I had to rally the lads at half-time, we spoke about character, playing for the shirt, playing for each other, having no regrets, and sticking to the gameplan. The lads did that, we got the goals, and it's just a shame we couldn't get that next one."