Although the area has been inhabited since ancient times, the foundation of the city now known as Madrid owes its origins to a small Roman settlement built on the banks of the Manzanares River called Matrice. It seems that by the late Visigothic period (7th century) this settlement was largely abandoned and only a small village remained. It was only in the ninth century, during the Umayyad period in al-Andalus, that Madrid became an important town in central Iberia (although still not as significant as Toledo).
Majrit/Mayrit: The Andalusi Muslim Heritage of Medieval Madrid
1