Paul Caddis' 93rd-minute equaliser saved Birmingham City from relegation and sent Doncaster Rovers into League One on Saturday.
On a dramatic final day that also saw Brighton and Hove Albion claim the final play-off spot, stunning late drama at the Reebok Stadium kept Birmingham safe on goal difference as they claimed an unlikely 2-2 draw.
Lee Clark's side seemed destined to drop into the third tier of English football for the first time since 1994-95 when they trailed Bolton Wanderers 2-0 with 14 minutes left.
But Nikola Zigic's header rallied Birmingham before their late pressure ended with Caddis nodding in from close range to delight the club's travelling supporters.
Birmingham were excellent in the first half and had 11 shots on goal to the three of their opponents, but they could not find the all-important breakthrough.
City – who started the day in 22nd, one point adrift of safety - saw Lee Novak go close twice around the half-hour mark before the same player steered in from close range after a free-kick, only for the effort to be ruled out for a foul in the build-up.
Lee Chung-Yong's arrowed finish from eight yards in the 57th minute gave Bolton the lead and Lukas Jutkiewicz was quick to double their advantage.
Zigic gave Birmingham a lifeline in the 78th minute, though, when he nodded Mitchell Hancox's excellent cross in before sustained pressure eventually led to a dramatic leveller.
Caddis was to provide it, following in after Zigic's header was cleared off the line by Tim Ream to secure his side's survival in the most dramatic way.
Birmingham's draw meant Doncaster were relegated by virtue of an inferior goal difference after a 1-0 defeat at champions Leicester City.
David Nugent scored the game's only goal from the penalty spot with 15 minutes to play as Doncaster – promoted in equally dramatic scenes on the final day of League One last term – were sent down.
At the other end of the table, Leonardo Ulloa's 92nd-minute header gave Brighton a 2-1 win at Nottingham Forest, a result that saw them finish a point ahead of Reading.
Matt Derbyshire headed Forest in front in the 22nd minute, but Stephen Ward levelled proceedings eight minutes after the break.
And Ulloa was on hand to head in Craig Mackail-Smith's cross in stoppage time to extend his side's season.
Brighton lost to eventual play-off winners Crystal Palace in last year's semi-finals.
Reading finished seventh after a 2-2 home draw against already promoted Burnley.
Kieran Trippier's own goal was cancelled out by Scott Arfield and then Danny Ings as Sean Dyche's side took the lead.
A stunning Garath McCleary volley drew Reading level with 32 minutes to play but they were unable to find a late winner.
Derby County finished third and will meet Brighton in the play-offs, but saw their 10-match winning streak against Leeds United come to an end as Matt Smith cancelled out Simon Dawkins' early goal in a 1-1 draw at Elland Road.
QPR warmed up for the play-offs with a 3-2 win at already relegated Barnsley, while Wigan Athletic, who will face Harry Redknapp's side over two legs, lost 4-3 at eighth-placed Blackburn Rovers.
Yeovil Town's first season in the second tier of English football saw them finish bottom as they lost 4-1 to Middlesbrough at home, while Blackpool – who ended just two points above the relegation zone – slumped to a 3-0 defeat against Charlton Athletic.
Other results on Saturday saw Huddersfield Town win 4-1 at Watford, while Ipswich Town beat Sheffield Wednesday 2-1 and Millwall edged Bournemouth 1-0.
|Coach: D. Freedman|
for R. Hall 61'
for Chung-Yong Lee 81'
for J. Beckford 86'
|Jonas´ agent confirms Barcelona approach|
|No problem with Mourinho, insists Guardiola ahead of derby in China|
|Toronto´s hat-trick hero Giovinco: I´m back|
|Drogba revels in ´special night´, dedicates hat-trick to family|
|MLS Review: Hat-tricks for Drogba and Giovinco as stars shine|
|Whelan backs Liverpool for top-four finish|
|Pellegrini still waiting for right offer|
|Ronaldo deserves to win Ballon d´Or - Vazquez|
|Phelan wants Hull job|
|Alaba saddened by Gotze exit|
|Morgan: Vardy right to re-sign|
|Maradona ´hurting´ as Higuain closes on Juventus move|
|Moyes watches Sunderland win, Ibe opens account in six-goal Bournemouth thriller|
|Messi cuts short holiday for Barcelona training camp|
|Ranieri still confident of keeping Mahrez|
|Toure to complete Celtic move on Sunday, says Rodgers|
|Vietto sends Simeone a reminder amid Barcelona links|
|Celtic 1 Leicester City 1 (5-6 on penalties): Mahrez magic the highlight as Ranieri´s side triumph i|
|Ribery, Alaba on target in Bayern win|
|Neymar hails Micale ahead of Olympic tilt|
|Ronaldo wants Real Madrid renewal|
|Ochoa joins Granada from Malaga|
|Heidel quashes Meyer to Liverpool as ´nonsense´|
|Scholes challenges Allardyce to change England mentality|
|Tenerife star Crosas investigated for killing endangered shark|
|De Gea: Manchester United can win title under Mourinho|
|Marseille replace Batshuayi with brother Leya Iseka|
|Cristiano Ronaldo: Best season of my career|
|Scholes: Pogba is not worth £100million|
|Gotze has not forgotten how to play football - Riedle|
|Delph learning more than ever under Guardiola|
|Jovetic ´not worried´ about Juventus|
|Allardyce wants Euro 2016 woes to fire his England|
|Giggs not in a rush to take manager´s job|
|Lopetegui: If not for Spain I would be Wolves boss|
|Shaw one of best left-backs in world - Herrera|
|Injured Sanchez to miss Arsenal tour|
|Melbourne Victory 1 Juventus 1 (Melbourne win 4-3 on pens): Thomas inspires Victory as Juve pay pena|
|Janssen: Ajax and PSV were never going to pay as much as Tottenham|
|Bayern to make Munich shooting tributes|
|Wenger wishes luck to old foe Allardyce|
|United defender Varela joins Frankfurt on loan|
|Sunderland appoint Moyes as Allardyce replacement|
|Javi Martinez devastated by Munich shootings|
|Rooney: I´m desperate to play for Mourinho, just like under Ferguson|
|Godin: Champions League the dream, but LaLiga the focus|
|Klopp hails Wijnaldum´s ´football smartness´|
|Klavan ready to fight for starting spot after completing ´dream´ Liverpool move|
|Real Salt Lake 1 San Jose Earthquakes 1: Mulholland salvages point|
|Madeira airport to be named after Cristiano Ronaldo|
|Villar, Ceferin and Van Praag announce UEFA presidential bid|
|Witsel has offers from England and Italy|
|Tuchel will bring out Gotze´s best - Watzke|
|Swansea confirm interest in Liverpool´s Allen|
|Arsenal´s Coquelin: LeBron v Curry is like Messi v Ronaldo|
|Rooney backs Allardyce appointment|
|Bayern and Ancelotti respond to Munich attacks|
|West Brom friendly cancelled over violence concerns|
|Allardyce ´cannot stop smiling´ after getting England job|
|Rakitic dismisses Barcelona exit talk|
|Oxlade-Chamberlain salvages draw for Arsenal in opening friendly|
|Bruce leaves Hull City by mutual consent|
|Juventus start Serie A title defence against Fiorentina|
|Guardiola already making impact at Manchester City - Clichy|
|Liverpool sign Netherlands international Wijnaldum|
|Ranieri: Chilwell, Ulloa going nowhere|
|Batshuayi: Conte already making me a better player|
|Allardyce determined to be the best - Davies|
|Wolfsburg sign Mayoral from Real Madrid|
|New coaches the attraction in USA/Europe Champions Cup zone|
|´It was like F1 v F3´ - Mourinho not making hasty judgments on United squad|
|Suarez would welcome Vietto with open arms at Barcelona|
|Glenn hails ´ideal candidate´ Allardyce|
|Juventus begin ICC campaign amid Pogba furore|
|Sunderland look to move forward after Allardyce departure|
|Kuyt backs Wijnaldum for Liverpool success|
|No major trophies, fewer goals than Moyes - the stats behind England boss Allardyce´s career|
|Hayden was wasting his career at Arsenal - Wenger|
|New recruits excite Aubameyang after United rout|
|Allardyce the right man to take England back to basics|
|Solve the Rooney puzzle and restore Sterling´s confidence: Five problems for Allardyce to solve|
|England appoint Allardyce as manager|
|Manchester United 1 Borussia Dortmund 4: Classy BVB hand Mourinho first defeat|
|James vows to stay at Real Madrid|
|Caught in a jam - Minnesota ´explain´ goalkeeper gaffe|
|Clarke nominated for FA chairman|
|Gazidis expects more Leicester-style Premier League triumphs|
|Arsenal snap up Bolton defender|
|Alex the Mann for Liverpool as veteran seals Anfield move|
|Dortmund sign Schurrle on five-year deal|
|Balotelli needs right opportunity - Raiola|
|Lukaku undergoes Lazio medical|
|Suarez: Messi better than Ronaldo by far|
|Allegri remains hopeful of Pogba Juve stay|
|Rakitic´s agent questions Barcelona midfield buys|
|Shearer: England players must respect Allardyce or walk|
|Raiola: I don´t give a damn if Pogba costs a world-record fee|
|Mazinho dreams of Thiago-Rafinha reunion at Barca|
|No heart, no gold says ex-Brazil striker Elber|
|There is space for Mata at United - Mourinho|
|Alonso: Guardiola needs time to improve City|
|Argentina approach Bauza to be coach|
|Inter still ´under construction´ - Ranocchia|
|Mourinho: Rooney will be an important player|
|Ganso prepared for the step up to European football|
|Dyke: Brexit could help England|
|Galatasaray confirm Lucas interest|
|Conte targets Champions League with Chelsea|
|Swansea style attracted new owners Kaplan and Levien|
|Mourinho not concerned if United fail to sign Pogba|
|Mourinho teased Ibrahimovic into United move|