To avoid relegation, the Iron also needed Colchester to lose their last game of the season at Carlisle. But that never looked like materialising.
Backed by the biggest crowd of the season, Scunthorpe pressed strongly throughout the opening half hour searching for an early goal they desperately needed.
They forced a succession of corners, but nothing would drop for them in front of goal. Then Swindon suddenly broke out from their defensive shell and were unlucky not to open the scoring.
Gary Roberts did have the ball in the net after 31 minutes only to see his diving header ruled out for offside.
Then centre-back Joe Devera rattled the post with another header from a free-kick, while goalkeeper Sam Slocombe twice rescued Scunthorpe with good saves to deny Adam Rooney and then James Collins.
The Iron huffed and puffed again in the second half but it was Swindon who snatched an 83rd-minute lead when James Collins fired home from close range from a right-wing cross from Andy Williams.
A scrambled 87th-minute equaliser by Michael Collins from as corner looked like only a consolation. But two minutes into stoppage time Mark Duffy fired them ahead from the penalty spot after substitute James Alabi had been brought down by visiting keeper Wes Foderingham.
And in the fourth minute of stoppage time Karl Hawley made it 3-1 from close range. But it was all too little, too late.
Source: PA
Source: PA