The seat of the municipality is the town of Mértola, which had around 2500 inhabitants at the time of the 2021 census, located on a hill over the Guadiana River. Its strategic location made it an important fluvial commercial port in Classical Antiquity, through the period of Umayyad conquest of Hispania: Mértola's main church (the Church of Nossa Senhora da Anunciação) is the only medieval mosque to have survived the period in Portugal.
In 2017 Mértola started the process to become a UNESCO World Heritage Site.
Mértola was inhabited at least since the Iron Age at least by Conni and Cynetes settlements. The original pre-Roman or Lusitanian name was Myrtilis or Mirtilus (referring to Iberian mint) a Hellenized adaptation subsequently renamed to Myrtilis Iulia by the Romans.
The strategic location of Mértola, on a hill by the northernmost navigable part of the Guadiana river, was crucial in its early development. Agricultural products grown in the villae nearby and valuable minerals (silver, gold and tin) obtained from the lower Alentejo region were sent from the fluvial port of Mértola via the Guadiana to Southern Hispania and the Mediterranean.
Between 1st and 2nd century, Myrtilis, part of the larger Pacensis region (under the capital Beja/Pax Julia), acquired great importance as a dynamic commercial centre, permitting it to mint its own coin. The town was raised to the status of a Municipium in times of Emperor Augustus and was connected to important Roman cities (Beja, Évora) through a road system.
During the Migration Period, Mértola was invaded by Germanic tribes of the Sueves and the Visigoths. In this period (5th-8th centuries) commerce was reduced but still active, as evidenced by Greek tombstones from the 6th-7th centuries found in Mértola which suggest trading, and the presence of Byzantine merchants in the town.