Bournemouth, who were top at the start of the day, could only draw 0-0 at Tranmere but were promoted to the Championship as runners-up.
At the other end, Scunthorpe had their relegation to the fourth tier confirmed after Colchester defeated Carlisle, rendering the Iron's 3-1 win over Swindon futile.
It was a frantic finish for Scunthorpe with all four goals scored in the last seven minutes, including two in stoppage time, but it proved not to be enough.
Swindon took the lead in the 83rd minute through James Collins but Scunthorpe levelled four minutes later through Michael Collins.
Portsmouth, meanwhile, finished their season with a 3-2 defeat by Shrewsbury.
Connor Goldson, Joe Jacobson and Akwasi Asante gave Shrewsbury a 3-0 lead before Ashley Harris and Patrick Agyemang scored for Pompey, but it was not enough to finish their disappointing campaign with a final victory.
More top news
James has the weather forecast in the west for the next few days
James has the weather in the east of the ITV Meridian region for the next few days
Thousands of people have turned out for this year's National Pride event - which has been held for the first time on the Isle of Wight.