Swansea secured promotion to the Championship as Guillem Bauza struck twice before the break to seal a 2-1 win at struggling Gillingham.
Dennis Oli had given the home side the lead before Bauza capitalised on two errors from Derek Stillie.
The home side dominated the early running and Simeon Jackson fired over from six yards, but they did get a deserved lead 10 minutes later when Dennis Oli struck when Paul Anderson blocked Simon King's shot only for Oli to slot home.
But Swansea controversially drew level just a minute before half-time when Stillie failed to hold Andy Robinson's low shot and Bauza tucked away the rebound despite Gills' protests that Stillie had been impeded.
And it got worse for the home side moments later when Stillie again fumbled Robinson's strike and Bauza took full advantage to fire in from the edge of the area.