The town was founded in 25 BC, with the name of Emerita Augusta (meaning the veterans – discharged soldiers – of the army of Augustus, who founded the city; the name Mérida is an evolution of this) by order of Emperor Augustus, to protect a pass and a bridge over the Guadiana river. Emerita Augusta was one of the ends of the Vía de la Plata (Silver Way), a strategic Roman Route between the gold mines around Asturica Augusta and the most important Roman city in the Iberian Peninsula. The city became the capital of Lusitania province, and one of the most important cities in the Roman Empire. Mérida preserves more important ancient Roman monuments than any other city in Spain, including a triumphal arch and a theatre.
After the fall of the Western Roman Empire, during the Visigothic period, the city maintained much of its splendor, especially under the 6th-century domination of the bishops, when it was the capital of Hispania. In 713 it was conquered by the Muslim army under Musa bin Nusair, and became the capital of the cora of Mérida; the Arabs re-used most of the old Roman buildings and expanded some, such as the Alcazaba. During the fitna of al-Andalus, Merida fell in the newly established Taifa of Badajoz.
The city was brought under Christian rule in 1230, when it was conquered by Alfonso IX of León, and subsequently became the seat of the priory of San Marcos de León of the Order of Santiago. A period of recovery started for Mérida after the unification of the crowns of Aragon and Castile (15th century), thanks to the support of Alonso de Cárdenas, Grand Master of the Order. In 1720 the city became the capital of the Intendencia of Mérida. It is on the Via de la Plata path of the Camino de Santiago as an alternative to the French Way.
In the 19th century, in the course of the Napoleonic invasion, numerous monuments of Mérida and of Extremadura were destroyed or damaged. Later the city became a railway hub and underwent massive industrialization.
On 10 August, 1936, during the Spanish Civil War, in the Battle of Mérida the Nationalists gained control of the city.