History of Madrid "Madrid" evolved from the Mozarabic "Matrit", which is still in the Madrilenian gentilic. The site of modern-day Madrid has been controlled since prehistoric times, and archaeological research found a small Visigothic village nearby. In the mid-9th century, Muhammad I of Córdoba constructed a small castle where the Palacio Real stands today. The Moors built a citadel, al-Mudayna, around this castle. They named the area after the nearby Manzanares River, which the Muslims called al-Majrīṭ (Arabic: "source of water"). From this came the name "Majerit", later spelled "Madrid". The Moors controlled the citadel until Alfonso VI of León and Castile conquered
Flag of the Community of Madrid of the City of Madrid's coat of arms. Flag of the Community of Madrid The flag of the Community of Madrid is crimson red, with seven five-pointed stars in silver, placed four and three in the centre of the field. The crimson color stands for Castile as Madrid has been historically Castillian, and the stars represents each of the administrative areas of the province of Madrid, which are the City of Madrid, Alcalá de Henares, Torrelaguna, San Martín de Valdeiglesias, El Escorial, Getafe and Chinchón. The stars are also thought to represent either the Ursa Major (The Plough asterism) or