Bottom club Rovers needed a result at home to second-bottom Portsmouth, and it appeared to be on the cards when Habib Beye and Fabien Robert put them two goals up after just five minutes.
But a pair of Greg Halford penalties in the second half, the first of which seeing Beye sent off in the process, sparked the game into life as James Coppinger restored the lead within two minutes of 2-2, only for Pompey to strike twice in stoppage time to dodge the chopping block for another week.
The goals, from Dave Kitson and Marko Futacs, meant there would be no such luck for the home side who will begin next season in League One with fellow strugglers
Stephen Pearson and Jon Stead had given the Robins a first-half lead which would have condemned both Doncaster and Portsmouth to the third tier on the day, only for Marlon King and Nikola Zigic to lead the fightback with a goal apiece for another point in their promotion charge.
Chris Hughton's side lost ground on
Ricardo Vaz Te helped himself to a stylish hat-trick with Kevin Nolan and Carlton Cole making it five after little over an hour, before an own goal by Gary Dicker summed up the afternoon for Gus Poyet's side.
The latter result sees the Sky Blues remain four points adrift of safety, while Portsmouth desperately need a win in their next match to avoid joining Doncaster on the confirmed list.