REUTERS: Derby County narrowly escaped relegation after drawing 3-3 with Sheffield Wednesday on Saturday on a final day of high drama at the bottom of the second-tier Championship.
Wednesday will join Wycombe Wanderers in League One next season along with Rotherham United, who were relegated after drawing 1-1 at Cardiff City.
Derby, managed by former England and Manchester United striker Wayne Rooney, came into their final match on the back of a six-game losing streak and needed at least a point to avoid the drop provided Rotherham did not win.
Derby fell behind when Sam Hutchinson bundled the ball over the line for Wednesday in time added on at the end of the first half.
Rooney's side roared back in the second, however, with goals from Martyn Waghorn and Patrick Roberts, but Wednesday equalised through Callum Paterson in the 62nd minute before Julian Borner gave them the lead in the 69th.
Waghorn drew Derby level from the penalty spot 10 minutes later, but their chances of survival still looked bleak, with Rotherham leading in Cardiff thanks to Lewis Wing's eighth- minute strike.
Marlon Pack's clinical finish in the 88th minute levelled that match, however, and Derby survived a frantic final seven minutes, plus six minutes of added time, to cling on for the draw and stay in the second tier.
Wednesday, who started the season with a 12-point deduction for breaching profit and sustainability rules which was cut in half on appeal, finished bottom on 41 points, three behind Derby.
Norwich City, who were crowned champions last week, were held to a 2-2 draw by Barnsley, who clinched fifth spot and will face fourth-placed Swansea City in a playoff semi-final.
Brentford, who won 3-1 at Bristol City, and Bournemouth, who were beaten 2-0 by Stoke City, will meet in the other playoff semi-final.
The winners of the two-legged semi-finals will meet at Wembley Stadium on May 29 with a place in the Premier League up for grabs.