In many countries, a mayor (from the Latin māior, meaning "greater") is the highest-ranking officer in the municipal government of a town or a large urban city.
In many municipal systems the mayor serves as chief executive officer and/or ceremonial official of many types of municipalities. Worldwide, there is a wide variance in local laws and customs regarding the powers and responsibilities of a mayor, as well as the means by which a mayor is elected or otherwise mandated.
In modern England and Wales, the mayor is the later descendant of the feudal lord's bailiff or reeve (see borough). The chief magistrate of London bore the title of portreeve for considerably more than a century after the Norman Conquest. This official was elected by popular choice, a privilege secured from King John. By the beginning of the 12th century, the title of portreeve gave way to that of mayor as the designation of the chief officer of London. The adoption of the title by other boroughs followed at various intervals. In the 19th century, in the United Kingdom, the Municipal Corporations Act 1882, Section 15, regulated the election of mayors. He was to be a fit person elected annually on 9 November by the council of the borough from among the aldermen or councillors or persons qualified to be such. His term of office was one year, but he is eligible for re-election. He may appoint a deputy to act during illness or absence, and such deputy must be either an alderman or councillor. A mayor who was absent from the borough for more than two months becomes disqualified and vacates his office. A mayor was ex officio a justice of the peace for the borough during his year of office and the next year. He received such remuneration as the council thought reasonable. These provisions have now been repealed.
In medieval Wales, the Laws of Hywel Dda codified the mayor (Latin: maior; Welsh: maer) as a position at the royal courts charged with administering the serfs of the king's lands. To maintain its dependence on and loyalty to the crown, the position was forbidden to the leaders of the clan groups. A separate mayor, known as the "cow-shit mayor" (maer biswail), was charged with overseeing the royal cattle. Similar offices were present at the Scottish and Irish courts.