The Arabs quickly spread throughout the Iberian Peninsula in the late 6th century unopposed and established control over the region called Al-Andalus, ruled by the Caliph of Damascus. The Arab domination of Spain lasted eight centuries. Between 719-729, what is now the Community of Madrid was occupied by Muslims and was part of Al-Andalus for 500 years. During this time, the Muslims built castles, watchtowers, and founded Madrid to communicate via smoke signals. The Umayyad Caliphate exercised power over Al-Andalus, with its capital in Córdoba.