Huddersfield 2-2 Barnsley
Huddersfield and Barnsley produced a thrilling draw as both sides escaped relegation on an afternoon of high drama at the John Smith's Stadium.
Scores here and elsewhere had both teams going down at different points, but Peterborough's 3-2 loss at Crystal Palace meant they drop into League One.
Chris O'Grady's low shot had put Barnsley in front, only for Jermaine Beckford to equalise for the hosts.
Jason Scotland restored Barnsley's lead but James Vaughan had the final word.
Vaughan's 82nd-minute equaliser would have condemned Barnsley to League One until news filtered through that Palace had scored a third against relegation rivals Posh, at which point it appeared as though both sets of players were happy to maintain the status quo.
The visitors had dominated early possession and looked the more assured side, so it was no surprise when O'Grady gave them the lead in the 14th minute.
Town defender Peter Clarke slipped when Barnsley midfielder David Perkins played the ball into the penalty area and O'Grady had time to pick his spot and curl a low right-footed shot inside the far post.
Huddersfield began to get a foothold in the game, but they had to wait until the 53rd minute to equalise, substitute Danny Ward slipping the ball through for Beckford, who clipped a fine finish inside Luke Steele's left-hand post.
Scotland then headed Barnsley back in front in the 75th minute. O'Grady's deft pass sent Perkins clear down the left and his precision cross was nodded home by the former Ipswich striker to send the visiting fans into raptures. The joy did not last.
Town substitute Lee Novak had been on the pitch for only a few seconds when his pass set up Vaughan, whose low finish flew in via a deflection off Steele. Tykes midfielder Tomasz Cywka was then sent on for Dawson with five minutes left as Barnsley scrambled for one last finale.
Scotland failed to connect when poised to turn the ball home and Cywka fired straight at Smithies, but with news of Palace's late goal sending Peterborough down, both sets of players played out the last few minutes without further incident.
Barnsley manager David Flitcroft:
"Mission Impossible achieved.
"We've beaten some incredible football teams and Mission Impossible can only be achieved by special people.
"Forget the football. Forget the quality, the disparity in this league, what we've achieved there is done by a group of special people and a special management team which has achieved something quite remarkable."
Huddersfield boss Mark Robins:
"It was the hardest 90 minutes that I've ever had to endure without a doubt.
"We were a million miles from our best, but we got what we needed at the end of it.
"The game doesn't really matter. It was the outcome that counted. When you've got a cup final, you've just got to get what you need.
"The job David Flitcroft has done is nothing short of miraculous because they were dead and buried in January."