Madrid
Madrid is the capital and most populous city of Spain. Madrid had a population of over 3.4 million in the city proper in 2025, and a metropolitan area population of approximately 6.8 million. It is the second-largest city in the European Union, after Berlin, and its metropolitan area is the second-largest in the EU, after Paris. The municipality covers an area of. Madrid lies on the River Manzanares in the central part of the Iberian Peninsula at about above mean sea level. The capital city of both Spain and the surrounding autonomous community of Madrid, it is the political, economic and cultural centre of the country.
The primitive core of Madrid, a walled military outpost, dates back to the late 9th century, under the Emirate of Córdoba. Conquered by Christians in 1083 or 1085, it consolidated in the Late Middle Ages as a sizeable town of the Crown of Castile. The development of Madrid as an administrative centre was fostered after 1561, as it became the permanent seat of the court of the Hispanic Monarchy. The following centuries were characterised by the reinforcement of Madrid's status within the framework of a centralised form of state-building.
The Madrid urban agglomeration has the second-largest GDP in the European Union. Madrid is ranked as an alpha world city by the Globalization and World Cities Research Network. The metropolitan area hosts major Spanish companies such as Telefónica, Iberia, BBVA and FCC. It concentrates the bulk of banking operations in Spain and it is the Spanish-speaking city generating the largest number of webpages. Madrid houses the headquarters of UN Tourism, the Ibero-American General Secretariat, the Organization of Ibero-American States, and the Public Interest Oversight Board. Pursuant to the standardising role of the Royal Spanish Academy, Madrid is a centre for Spanish linguistic prescriptivism. Madrid organises fairs such as FITUR, ARCO, SIMO TCI and the Madrid Fashion Week. Madrid is home to football clubs Real Madrid and Atlético Madrid.
Its landmarks include the Plaza Mayor; the Royal Palace of Madrid; the Royal Theatre with its restored 1850 Opera House; the Buen Retiro Park, founded in 1631; the 19th-century National Library building containing some of Spain's historical archives; many national museums; and the Golden Triangle of Art, located along the Paseo del Prado and comprising three art museums: the Prado Museum; the Reina Sofía Museum, a museum of modern art; and the Thyssen-Bornemisza Museum, which complements the holdings of the other two museums. The mayor is José Luis Martínez-Almeida from the People's Party.
Etymology
The origin of the name is unknown. There are various theories regarding the origin of the toponym "Madrid", all of them with problems when it comes to fully explaining the phonetic evolution of the toponym, namely:Nicknames for Madrid include the plural Los Madriles and La Villa y Corte.
History
The site of modern-day Madrid has been occupied since prehistoric times. There are archaeological remains of the Celtic Carpetani settlement, Roman villas, a Visigoth basilica near the church of Santa María de la Almudena and three Visigoth necropolises near Casa de Campo, Tetuán and Vicálvaro.Middle Ages
The first historical document about the existence of an established settlement in Madrid dates from the Muslim age. In the second half of the 9th century, Umayyad Emir Muhammad I built a fortress on a headland near the river Manzanares as one of the many fortresses he ordered built on the border between Al-Andalus and the kingdoms of León and Castile, with the objective of protecting Toledo from Christian attacks from the North and as a starting point for Muslim offensives. After the disintegration of the Caliphate of Córdoba in the early 11th century, Madrid was integrated in the Taifa of Toledo.In the context of the wider campaign for the conquest of the taifa of Toledo initiated in 1079, Madrid was seized in 1083 by Alfonso VI of León and Castile, who sought to use the town as an offensive outpost against the city of Toledo, in turn conquered in 1085. Following the conquest, Christians occupied the centre of the city, while Muslims and Jews were displaced to the suburbs. Madrid, located near Alcalá, remained a borderland for a while, suffering a number of razzias during the Almoravid period, and its walls were destroyed in 1110.
Madrid was confirmed as villa de in 1123, during the reign of Alfonso VII. The 1123 Charter of Otorgamiento established the first explicit limits between Madrid and Segovia, namely the Puerto de El Berrueco and the Puerto de Lozoya. Beginning in 1188, Madrid had the right to be a city with representation in the courts of Castile. In 1202, Alfonso VIII gave Madrid its first charter to regulate the municipal council, which was expanded in 1222 by Ferdinand III. The government system of the town was changed to a regimiento of 12 regidores by Alfonso XI in January 1346.
Starting in the mid-13th century and up to the late 14th century, the concejo of Madrid vied for the control of the Real de Manzanares territory against the concejo of Segovia, a powerful town north of the Sierra de Guadarrama mountain range, characterised by its repopulating prowess and its animal husbandry-based economy, in contrast to the agricultural and less repopulated town of Madrid. After the decline of Sepúlveda, another concejo north of the mountain range, Segovia became a major actor south of the Guadarrama mountains, expanding across the Lozoya and Manzanares rivers to the north of Madrid and along the Guadarrama river course to its west.
In 1309, the Courts of Castile convened at Madrid for the first time under Ferdinand IV, and later in 1329, 1339, 1391, 1393, 1419 and twice in 1435.
Modern Age
During the revolt of the Comuneros, led by Juan Lopez de Padilla, Madrid joined the revolt against Charles, Holy Roman Emperor. After defeat at the Battle of Villalar, Madrid was besieged and occupied by the imperial troops. The city was however granted the titles of Coronada and Imperial.The number of urban inhabitants grew from 4,060 in 1530 to 37,500 in 1594. The poor population of the court was composed of ex-soldiers, foreigners, rogues and Ruanes, dissatisfied with the lack of food and high prices. In June 1561 Phillip II set his court in Madrid, installing it in the old alcázar. Thanks to this, Madrid became the political centre of the monarchy, being the capital of Spain except for a short period between 1601 and 1606, in which the Court was relocated to Valladolid, and the Madrid population temporarily plummeted. Being the capital was decisive for the evolution of the city and influenced its fate. During the rest of the reign of Philip II, the population boomed, going up from about 18,000 in 1561 to 80,000 in 1598.
File:Madrid - Calle de Alcalá in 18th-century by Antonio Joli.jpg|thumb|The Calle de Alcalá in 1750 by Antonio Joli
In the early 17th century, although Madrid recovered from the loss of its capital status, with the return of diplomats, lords and affluent people, as well as an entourage of noted writers and artists together with them, extreme poverty remained rampant. The century also was a time of heyday for theatre, represented in the so-called corrales de comedias.
Madrid changed hands several times during the War of the Spanish Succession: from the Bourbon control it passed to the allied "Austracist" army with Portuguese and English presence that, only to be retaken by the Bourbon army on 4 August 1706. The Habsburg army led by the Archduke Charles in September 1710, leaving the city less than three months after. Philip V entered the capital on 3 December 1710.
Seeking to take advantage of Madrid's location at the geographic centre of Spain, the 18th century saw a sustained effort to create a radial system of communications and transports for the country through public investments.
Philip V built the Royal Palace, the Royal Tapestry Factory and the main Royal Academies. The reign of Charles III, who came to be known as "the best mayor of Madrid", saw an effort to turn the city into a true capital, with the construction of sewers, street lighting, cemeteries outside the city and a number of monuments and cultural institutions. The reforms enacted by his Sicilian minister were however opposed in 1766 by the populace in the so-called Esquilache Riots, a revolt demanding to repeal a clothing decree banning the use of traditional hats and long cloaks aiming to curb crime in the city.
File:El dos de mayo de 1808 en Madrid.jpg|thumb|The Second of May 1808 by Francisco de Goya
In the context of the Peninsular War, the situation in French-occupied Madrid after March 1808 was becoming more and more tense. On 2 May, a crowd began to gather near the Royal Palace protesting against the French attempt to evict the remaining members of the Bourbon royal family to Bayonne, prompting up an uprising against the French Imperial troops that lasted hours and spread throughout the city, including a famous last stand at the Monteleón barracks. Subsequent repression was brutal, with many insurgent Spaniards being summarily executed. The uprising led to a declaration of war calling all the Spaniards to fight against the French invaders.
Capital of the Liberal State
Madrid was invaded on 24 May 1823 by a French army—the so-called Hundred Thousand Sons of Saint Louis—called to intervene to restore the absolutism of Ferdinand that the latter had been deprived from during the 1820–1823 trienio liberal. Unlike other European capitals, during the first half of the 19th century the only noticeable bourgeois elements in Madrid were merchants. The University of Alcalá de Henares was relocated to Madrid in 1836, becoming the Central University.Madrid's economy modernised during the second half of the 19th century, consolidating its status as a service and financial centre. New industries were mostly focused in book publishing, construction and low-tech sectors. The introduction of railway transport greatly helped Madrid's economic prowess, and led to changes in consumption patterns, such as the substitution of salted fish for fresh fish from the Spanish coasts, and further strengthening Madrid's role as a logistics node in Spain's distribution network. Electric lighting in the streets was introduced in the 1890s.
During the first third of the 20th century the population nearly doubled, reaching more than 850,000 inhabitants. New suburbs such as Las Ventas, Tetuán and El Carmen became the homes of the influx of workers, while Ensanche became a middle-class neighbourhood of Madrid.