The owners of Aberavon's castle established a chartered town, which in 1372 received a further charter from Edward le Despencer, 1st Baron le Despencer. In modern times these charters were not acted upon, the town being deemed a borough by prescription, but in 1861 it was incorporated under the Municipal Corporations Act. From 1832 it belonged to the Swansea District constituency, uniting with Kenfig, Loughor, Neath and Swansea to return one member; later it acquired its own MP.