The municipality (Spanish: municipio, IPA: [muniˈθipjo], Catalan: municipi, Galician: concello, Basque: udalerria, Asturian: conceyu)[note 1] is one of the two fundamental territorial divisions in Spain, the other being the provinces.
A Spaniard abroad, upon registering in a consulate, has the right to vote in the local elections of the last municipality they resided in.
A Spanish citizen born abroad must choose between the last municipality his or her mother or father last lived in.
Municipalities were first created by decree on 23 May 1812 as part of the liberal reforms associated with the new Spanish Constitution of 1812 and based on similar actions in revolutionary France.
The idea was to rationalise and homogenise territorial organisation, do away with the prior feudal system and provide equality before the law of all citizens.