MK Dons' fightback to beat Accrington proved in vain as Swindon pipped Martin Allen's side to the last automatic League Two promotion slot. David Brown fired Accrington into the lead but Keith Andrews levelled from the penalty spot after Izale McLeod had been fouled by Leam Richardson.
Sean O'Hanlon's towering far-post header from Jon-Paul McGovern's free-kick put Dons ahead.
Substitute Jude Stirling's late far-post header sealed the points.
Milton Keynes Dons: Bankole, Lewington, O'Hanlon, Diallo, Edds, Dyer, Blizzard (Hayes 58), Andrews, Jarrett (Stirling 29), McLeod, Knight (McGovern 64).
Subs Not Used: Harper, Platt.
Booked: O'Hanlon.
Goals: Andrews 55 pen, O'Hanlon 69, Stirling 83.
Accrington Stanley: Martin (Dunbavin 75), Richardson, Antwi (Ventre 85), Welch, Cavanagh, Robert Grant, Harris, Proctor, Todd, Mullin (McGivern 75), Brown.
Subs Not Used: Almeida, Edwards.
Booked: Richardson, Harris, Welch.
Goals: Brown 14.
Att: 8,102
Ref: I Williamson (Berkshire).