Its population in 2009 was estimated to be 29,495.
The name's origin is attributed to the Carthaginian general Mago Barca, brother to Hannibal, who is thought to have taken refuge there in 205 BC. After the fall of the Western Roman Empire, it became part of the Eastern Empire; it suffered raids from Vikings and Arabs, until the Islamic Caliphate of Córdoba conquered it in 903.
Maó-Mahón was captured in 1287 from the Moors by Alfonso III of Aragon and incorporated into the Kingdom of Majorca, a vassal kingdom of the Crown of Aragon. Its harbour, one of the most strategically important in the western Mediterranean, was re-fortified.
In 1535, the Ottomans under Hayreddin Barbarossa attacked Maó-Mahón and took 6,000 captives as slaves back to Algiers, in the Sack of Mahon.
Menorca was captured in 1708 by a joint British-Dutch force on behalf of Holy Roman Emperor Charles VI, during the War of the Spanish Succession. The British saw the island's potential as a naval base and sought to take full control. Its status as a British possession was confirmed by the Treaty of Utrecht in 1713. During the island's years as a British dependency, the capital was moved from Ciutadella de Menorca to Mahon, which then served as residence for the governor, the most famous being General Richard Kane. During this period the natural harbour leading to the town and surrounding settlements were sometimes collectively known as "Port Mahon" (see map left).
The island was lost to the French in 1756 following the naval Battle of Menorca and the final Siege of Fort St Philip, which took place several miles from the town. After their defeat in the Seven Years' War, France returned the island to the British in 1763. In a joint Franco-Spanish effort and following a long five month invasion, the British surrendered the island again in 1782; It was transferred to Spain in 1783 as part of the Peace of Paris. The British recaptured the island in 1798, during the French Revolutionary Wars. The British and the French tried (and failed) to end hostilities between themselves with the Treaty of Amiens in 1802. Both nations agreed to cede or withdraw from certain territories, with the island of Menorca passing to the Spanish, with whom it has remained since.
A small but important Royal Navy Dockyard was established by the British on the north side of the harbour, opposite the town, in 1715. It served as the Royal Navy's principal Mediterranean base for much of the 18th century, and remains in use today as a Spanish Naval station. Several Dockyard buildings, dating from the 1760s, can still be seen on Illa Pinto (formerly known as Saffron Island) including a Naval Storehouse with clock tower. There recently have been moves to establish a maritime museum here. The island has a distinctive octagonal shape, formed when wharves were constructed around it in the 1760s to enable several warships to be careened there all at once.
The ruins of a former Royal Naval Hospital, founded in 1711, stand on another nearby island (Illa del Rei). They recently have been restored.
During the Spanish Civil War, the island remained loyal to the Republic, but was captured by the Nationalists in 1939. During the battle to recapture the islands from the republicans, Maó-Mahón was bombed by Italian and Spanish Nationalist bomber planes.
Spanish dictator Francisco Franco visited the city on 11 May, 1960 to open a new thermal power station. The event was used by the authorities as propaganda for Franco's regime.
Today it serves as the seat of the Island Council of Menorca (Consell Insular de Menorca).
Towards the end of the 20th century, the renovation of its historic centre was made possible by income from tourism.
A traditional cheese made on the island (Mahón cheese) is named after the city. Some believe that the origin and name of mayonnaise are found in this Menorcan city. In Spanish mahón is also the name of nankeen, especially the blue cloth.
At 39°51'25"N 4°17'26"E, there is a large military-used Wullenweber antenna for radio direction finding.