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 sector employs 18.1% of all employees. Madrid attracts about 8M tourists annually from other parts of Spain and from all over the world, exceeding even Barcelona. Spending by tourists in Madrid was estimated (2011) at €9,546.5M, or 7.7% of the city's GDP. The construction of transport infrastructure has been vital to maintain the economic position of Madrid. Travel to work and other local journeys use a high-capacity metropolitan road network and a well-used public transport system. In terms of longer-distance transport, Madrid is the central node of the system of "autovías" and of the high-speed rail network (AVE), which has