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
Madrid Accords but has been admitted as Western Sahara's representative to the African Union (AU) and its ruling party (the Polisario Front) is recognized by the UN at least as the "soul legitimate representative of the Sahrawi people". Mauritania has pulled out from the conflict entirely since 1979. The following is the published text of the Madrid Accords: Madrid Accords The Madrid Accords, also called Madrid Agreement or Madrid Pact, was a treaty between Spain, Morocco, and Mauritania to end the Spanish presence in the territory of Spanish Sahara, which was until the Madrid Accords' inception a Spanish province and former colony.