Derby County narrowly escaped relegation from the Championship after drawing 3-3 with Sheffield Wednesday on a final day of high drama at the bottom of the table.
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 play-off semi-final.
Republic of Ireland striker Adam Idah scored the Canaries' second goal on 54 minutes for his third league goal of an injury-interrupted campaign.
Brentford, who won 3-1 at Bristol City, and Bournemouth, who were beaten 2-0 by Stoke City, will meet in the other play-off semi-final.
The winners of the two-legged semi-finals will meet at Wembley Stadium on 29 May with a place in the Premier League up for grabs.