Ayuntamiento () is the general term for the town council, or cabildo, of a municipality or, sometimes, as is often the case in Spain and Latin America, for the municipality itself. is mainly used in Spain; in Latin America is also for municipal governing bodies, especially the executive ones, where the legislative body and the executive body are two separate entities. In Catalan-speaking parts of Spain, municipalities generally use the Catalan cognate, , while Galician ones use the word , Astur-Leonese and Basque . Since is a metonym for the building in which the council meets, it also translates to "city/town hall" in English.
With the eighteenth-century Bourbon Reforms in New Spain, which created intendancies and weakened the power of the viceroy, the ayuntamientos "became the institution representing the interests of the local and regional oligarchical groups then setting deep roots into their territories." The Spanish Constitution of 1812 called for the transformation of the ayuntamiento, previously dominated by elites, into a representative institution with elections. Article 310 called for the establishment of an ayuntamiento for all settlements with 1,000 inhabitants.
The term was often preceded by the word ("most excellent"), when referring to the council. This phrase is often abbreviated "Exc.<sup>mo</sup> Ay.<sup>to</sup> ". Other names for ayuntamiento have been casa de cabildo, casa capitular, casa consistorial and casa del concejo.
In Latin America several terms exist for the legislative bodies of municipalities. The term is used in Argentina, Chile, Colombia, Costa Rica, and Peru. In Mexico the term is for the council (which refers to itself as the , or ). Puerto Rican municipalities have a legislatura municipal. In Peru the term is never used; instead, it is , or (district council). Executive functions in most of these countries is handled by an executive , the mayor (not to be confused with the historic , who was a magistrate).