AFC Wimbledon’s Joe Pigott scored in the sixth minute of injury time as the Dons and Rochdale played out a thrilling 3-3 draw at Plough Lane.
After dominating the opening 35 minutes, Wimbledon were caught napping from a corner and Jake Beesley tapped home.
Gabriel Osho doubled the lead just before the hour mark, but two quick goals – from Jack Rudoni and Ollie Palmer – had Wimbledon believing.
Jimmy Keohane scooped low to head home and restore Dale’s lead, before Pigott intervened right at the death, to make amends for an earlier missed penalty.
Beesley got on the end of a scruffy Conor Grant corner to open the scoring 41 minutes in but the hosts rallied, Luke O’Neill clipping the top of the bar.
Osho made them pay after nodding in a long throw from Conor Shaughnessy with 57 minutes gone, but Mark Robinson’s side responded in style.
Rudoni thumped home a header from six yards just after the hour, before Palmer tapped in after 66 minutes when Jay Lynch spilled a routine cross.
Keohane’s goal provided yet another twist and just when it seemed their battle against relegation was in their own hands, Pigott lashed home a sumptuous strike to all but mathematically ensure his side’s League One status for another season.