Pompey completed a fine second half turnaround to beat Wigan in the season's final Fratton fixture.
The visitors needed just a point to mathematically secure a spot in the Championship, but were beaten 3-2 on the south coast.
Danny Cowley's side dominated before the break, but still trailed to goals from Callum Lang and Will Keane.