Lee Brown hit a dramatic stoppage-time winner as Bristol Rovers left it late to join Oxford in sealing their promotion from Sky Bet League Two.
Both sides, plus Accrington, went in to final match of the season with a chance to join title winners Northampton in League One, but Rovers were seconds away from being the odd ones out as goals from Matty Cash and Billy Bodin left their clash with relegated Dagenham level at 1-1.
But Brown netted in the second minute of added time to turn that equation on its head, snatching third place with a 2-1 win and leaving Stanley in the play-offs.
Accrington's 0-0 draw at home to Stevenage extended their unbeaten streak to 12 games but was just not enough.
Oxford's afternoon progressed more serenely as they coasted to a 3-0 home win over Wycombe.
They had to wait until the 54th minute for Cheyenne Dunkley to open the scoring, but after he did Christopher Maguire's penalty and Callum O'Dowda's late finish made second place safe.
Northampton's triumphant campaign ended with a 29th win and a 99th point, as they saw off 10-man Portsmouth.
James Collins secured the points after a Jack Whatmough own-goal and Kal Naismith's effort had cancelled each other out.
Pompey's play-off opponents Plymouth served warning with a 5-0 home win over Hartlepool.
Tyler Harvey and Louis Rooney both scored twice, with Curtis Nelson joining them on the scoresheet.
Carlisle enjoyed the same scoreline away at Notts County, ending an up-and-down season on a high as Alex Gilliead, Danny Grainger, Jabo Ibehre (two) and Charlie Wyke all found the net.
AFC Wimbledon, who already had seventh place in the bag, await Accrington and go into that fixture on the back of a 1-0 over visiting Newport. Toyosi Olusanya got the decider from the penalty spot.
York bade farewell to the Football League with a 1-1 draw against Morecambe at the Globe Arena.
Luke Summerfield scored on the cusp of half-time for the Minstermen but Jamie Devitt levelled early in the second half.
Meanwhile, there were handsome wins for Luton, 4-1 over Exeter, and Barnet, who scored three unanswered goals at Crawley, while Mansfield and Cambridge finished 0-0.