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 Wright has the latest weather forecast for the west of the ITV Meridian region
James Wright has the latest weather forecast for the east of the ITV Meridian region
Ukip leader fails to see the humour in a phone app created by teenagers which pokes fun at him and his party's views on immigrants.