Elvas is among the finest examples of intensive usage of the trace italienne (star fort) in military architecture, and including is old town, has been a World Heritage Site since 30 June 2012.
Elvas lies on a hill 8 kilometres (5.0 mi) northwest of the Guadiana river. The Amoreira Aqueduct, 6 kilometres (3.7 mi) long, supplies the city with clean water; it was begun early in the 15th century and completed in 1622. For some distance it includes four tiers of superimposed arches, with a total height of 40 metres (130 ft).
The city was wrested from the Moors by Afonso I of Portugal in 1166 but was temporarily recaptured before its final occupation by the Portuguese in 1226. In 1570 it became an episcopal see, the Roman Catholic Diocese of Elvas, until 1818. The late Gothic Our Lady of the Assumption Cathedral, which has many traces of Moorish influence in its architecture, dates from the reign of Manuel I of Portugal (1495–1521).
It was defended by seven bastions and the two forts of Santa Luzia and the Nossa Senhora da Graça Fort. From 1642 it was the chief frontier fortress south of the Tagus, which withstood sieges by the Spanish in 1659, 1711, and 1801. Elvas was the site of the Battle of the Lines of Elvas in 1659, during which the garrison and citizens of the city assisted in the rout of a Spanish Army. The Napoleonic French under Marshal Junot took it in March 1808 during the Peninsular War, but evacuated it in August after the conclusion of the Convention of Sintra. The fortress of Campo Maior 15 kilometres (9.3 mi) to the northeast is known for its Napoleonic era siege by the French and relief by the British under Marshal Beresford in 1811, an exploit commemorated in a ballad by Sir Walter Scott.