Joe Thompson scored the goal that saved Rochdale from relegation in the final game of a season when he successfully overcame cancer for the second time.
In a remarkable final act to an escape that looked highly unlikely only a few weeks ago, Thompson came off the bench to net the 69th-minute winner to beat Charlton 1-0.
Rochdale needed to better Oldham’s result to secure safety and they had an agonising wait as relegated Northampton held on for a 2-2 draw against the Latics.
George Edmundson put Oldham ahead but a Matt Grimes penalty and a goal from Ash Taylor right at the end of the first half gave Northampton the lead.
Tom Haymer equalised 10 minutes after the break but Oldham could not find a winner.
Wigan lifted the League One trophy after a 1-0 victory over Doncaster, Will Grigg scoring his 19th goal of the season in the 75th minute.
Paul Cook’s side only needed a point to finish ahead of Blackburn, who maintained the pressure to the finish with a 2-1 victory over Oxford.
Darragh Lenihan gave Rovers an early lead and they would have gone further ahead but for a superb save from Simon Eastwood to keep out Charlie Mulgrew’s penalty.
James Henry equalised but Jack Payne found a winner.
Shrewsbury must turn their faltering form around for the play-offs if their impressive season is not to end in disappointment.
Kieran Agard’s 63rd-minute penalty gave relegated MK Dons a 1-0 victory, making it just one win from their last seven for the Shrews.
Shrewsbury will face Charlton while Rotherham take on Scunthorpe.
Will Vaulks scored for the Millers in a 1-0 win over Blackpool but Scunthorpe had to settle for a 1-1 draw with Bradford, Conor Townsend swiftly cancelling out Matt Kilgallon’s opener.
Gillingham had not won in nine games or scored in four, but they ended the season in fine style with a 5-2 win over Plymouth, who went into the final day with a very outside chance of making the play-offs.
Tom Eaves was the hero with a hat-trick in 21 minutes either side of half-time after Josh Parker had given the Gills the lead. Joel Grant and Graham Carey netted for Plymouth but Elliott List scored a late fifth for the hosts.
Bottom side Bury showed good fight as they headed down to League Two, battling back from two down to draw 2-2 with Wimbledon.
Dean Parrett and Kwesi Appiah scored in the first half for the Dons but Neil Danns and George Miller earned Bury a point.
Incoming boss Joey Barton will have been pleased with Fleetwood’s end to the season, the Cod Army ending a three-game losing run by beating Walsall 2-0, Ashley Hunter and Paddy Madden scoring the goals.