In the Roman Empire, the city was known as "Emerita Augusta", the capital of the province of Lusitania. It was founded in 25 BC by Emperor Augustus as a colony for the veteran soldiers ("emeritus") of the Roman legions. The city was very important in Roman Hispania. It was endowed with all the comforts of a large Roman city and served as the capital of the Roman province of Lusitania. For centuries, until the fall of the Roman Empire, Mérida was an important economic, military, and cultural center. Following invasions from the Visigoths, Mérida remained an important city of the Visigothic Kingdom of Hispania in the 6th century. In 713, the Arabs conquered the city and devastated it. Even under Islamic rule, Mérida remained a bishop's seat until it was moved to Santiago de Compostela in 1119. In 1230 the Christian troops under Alfonso IX conquered Mérida during the Reconquista. The Alcazaba of Mérida is a ninth-century Muslim fortification, located near the Roman bridge over the Guadiana River. It was built by Emir Abd ar-Rahman II in 835 to command the city, which had rebelled in 805. It includes a big squared line of walls, every side measuring 130 meters in length, 10 m in height, and 2.7 m in thickness, built by re-using Roman walls and Roman-Visigothic edifices. Inside is an "aljibe", a rainwater tank including a cistern to collect and filter water from the river. The Alcazaba of Mérida is actually the first ever alcazaba in Al-Andalus.