Madrid is the capital and largest city of Spain. The population of the city is almost 3.2 million and that of the Madrid metropolitan area, around 6.3 million. It is the third-largest city in the European Union, after London and Berlin, and its metropolitan area is the third-largest in the European Union after London and Paris. The city spans a total of .
The city is located on the Manzanares River in the centre of both the country and the Community of Madrid (which comprises the city of Madrid, its conurbation and extended suburbs and villages); this community is bordered by the autonomous communities of Castile and León and Castile-La Mancha. As the capital city of Spain, seat of government, and residence of the Spanish monarch, Madrid is also the political, economic and cultural centre of Spain. The current mayor is Ana Botella from the People's Party (PP).
The Madrid urban agglomeration has the third-largest GDP in the European Union and its influences in politics, education, entertainment, environment, media, fashion, science, culture, and the arts all contribute to its status as one of the world's major global cities. Due to its economic output, high standard of living, and market size, Madrid is considered the major financial centre of Southern Europe and the Iberian Peninsula; it hosts the head offices of the vast majority of the major Spanish companies, such as Telefónica, Iberia or Repsol. Madrid is the 17th most livable city in the world according to Monocle magazine, in its 2014 index.
Madrid houses the headquarters of the World Tourism Organization (WTO), belonging to the United Nations Organization (UN), the SEGIB, the Organization of Ibero-American States (OEI), and the Public Interest Oversight Board (PIOB). It also hosts major international regulators of Spanish: the Standing Committee of the Association of Spanish Language Academies, headquarters of the Royal Spanish Academy (RAE), the Cervantes Institute and the Foundation of Urgent Spanish (Fundéu BBVA). Madrid organizes fairs such as FITUR, ARCO, SIMO TCI and the Cibeles Madrid Fashion Week.
While Madrid possesses a modern infrastructure, it has preserved the look and feel of many of its historic neighbourhoods and streets. Its landmarks include 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 (founded in 1712) containing some of Spain's historical archives; a large number of national museums, and the Golden Triangle of Art, located along the Paseo del Prado and comprising three art museums: Prado Museum, the Reina Sofía Museum, a museum of modern art, and the Thyssen-Bornemisza Museum, which completes the shortcomings of the other two museums. Cibeles Palace and Fountain have become the monument symbol of the city.
The first documented reference of the city originates in andalusan times as the Arabic مجريط Maǧrīţ (AFI), which was retained in Medieval Spanish as Magerit). A wider number of theories have been formulated on possible earlier origins.
According to legend, Madrid was founded by Ocno Bianor (son of King Tyrrhenius of Tuscany and Mantua) and was named "Metragirta" or "Mantua Carpetana". Others contend that the original name of the city was "Ursaria" ("land of bears" in Latin), because of the many bears that were to be found in the nearby forests, which, together with the strawberry tree (Spanish madroño), have been the emblem of the city from the Middle Ages.
The most ancient recorded name of the city "Magerit" (for *Materit or *Mageterit?) comes from the name of a fortress built on the Manzanares River in the 9th century AD, and means "Place of abundant water". If the form is correct, it could be a Celtic place-name from ritu- 'ford' (Old Welsh rit, Welsh rhyd, Old Breton rit, Old Northern French roy) and a first element, that is not clearly identified *mageto derivation of magos 'field, plain' (Old Irish mag 'field', Breton ma 'place'), or matu 'bear', that could explain the Latin translation Ursalia.
Nevertheless, it is also speculated that the origin of the current name of the city comes from the 2nd century BC. The Roman Empire established a settlement on the banks of the Manzanares river. The name of this first village was "Matrice" (a reference to the river that crossed the settlement). Following the invasions carried out by the Germanic Sueves and Vandals, as well as the Sarmatic Alans during the 5th century AD, the Roman Empire no longer had the military presence required to defend its territories on the Iberian Peninsula, and as a consequence, these territories were soon occupied by the Vandals, who were in turn dispelled by the Visigoths, who then ruled Hispania in the name of the Roman emperor, also taking control of "Matrice". In the 8th century, the Islamic conquest of the Iberian Peninsula saw the name changed to "Mayrit", from the Arabic term ميرا Mayra (referencing water as a 'tree' or 'giver of life') and the Ibero-Roman suffix it that means 'place'. The modern "Madrid" evolved from the Mozarabic "Matrit", which is still in the Madrilenian gentilic.
Although the site of modern-day Madrid has been occupied since prehistoric times, and there are archeological remains of 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, Tetúan and Vicálvaro, the first historical document about the existence of an established settlement in Madrid dates from the Muslim age. At the second half of the 9th century, Emir Muhammad I of Córdoba built a fortresses on a headland near the river Manzanares, as one of the many fortress he ordered to be built on the border between Al-Andalus and the kingdoms of León and Castile, with the objective of protecting Toledo from the Christian invasions and also as a starting point for Muslim offensives. After the disintegration of the Caliphate of Córdoba, Madrid was integrated in the Taifa of Toledo.
With the surrender of Toledo to Alfonso VI of León and Castile, the city was conquered by Christians in 1085, and it was integrated into the kingdom of Castile as a property of the Crown. Christians replaced Muslims in the occupation of the center of the city, while Muslims and Jews settled in the suburbs. The city was thriving and was given the title of Villa, whose administrative district extended from the Jarama in the east to the river Guadarrama in the west. The government of the town was vested to the neighboring of Madrid since 1346, when king Alfonso XI of Castile implements the regiment, for which only the local oligarchy was taking sides in city decisions. Since 1188, Madrid won the right to be a city with representation in the courts of Castile. In 1202, King Alfonso VIII of Castile gave Madrid its first charter to regulate the municipal council, which was expanded in 1222 by Ferdinand III of Castile.
The first time the Courts of Castile were joined in Madrid was in 1309 under Ferdinand IV of Castile, and later in 1329, 1339, 1391, 1393, 1419 and twice in 1435. Since the unification of the kingdoms of Spain under a common Crown, the Courts were convened in Madrid more often.
During the revolt of the Comuneros, led by Juan de Padilla, Madrid joined the revolt against Emperor Charles V of Germany and I of Spain, but after defeat at the Battle of Villalar, Madrid was besieged and occupied by the royal troops. However, Charles I was generous to the town and gave it the titles of Coronada (Crowned) and Imperial. When Francis I of France was captured at the battle of Pavia, he was imprisoned in Madrid. And in the village is dated the Treaty of Madrid of 1526 (later denounced by the French) that resolved their situation.
In June 1561, when the town had 30,000 inhabitants, Philip II of Spain moved his court from Valladolid to Madrid, installing it in the old castle. Thanks to this, the city of Madrid became the political center of the monarchy, being the capital of Spain except for a short period between 1601 to 1606 (Philip III of Spain's government), in which the Court returned to Valladolid. This fact was decisive for the evolution of the city and influenced its fate. A famous expression indicated that identity: "Sólo Madrid es corte" (Madrid is the only court) which, conceptually, is also understood backwards: "Madrid es sólo corte" (Madrid is just court).
During the reign of Philip III and Philip IV of Spain, Madrid saw a period of exceptional cultural brilliance, with the presence of geniuses such as Miguel de Cervantes, Diego Velázquez, Francisco de Quevedo and Lope de Vega.
Philip V built the Royal Palace, the Royal Tapestry Factory and the main Royal Academies. But the most important Bourbon was King Charles III of Spain, who was known as "the best mayor of Madrid". Charles III took upon himself the feat of transforming Madrid into a capital worthy of this category. He ordered the construction of sewers, street lighting, cemeteries outside the city, and many monuments (Puerta de Alcalá, Cibeles Fountain), and cultural institutions (El Prado Museum, Royal Botanic Gardens, Royal Observatory, etc.). Despite being known as one of the greatest benefactors of Madrid, his beginnings were not entirely peaceful, as in 1766 he had to overcome the Esquilache Riots, a traditionalist revolt instigated by the nobility and clergy against his reformist intentions, demanding the repeal of the clothing decree ordering the shortening of the layers and the prohibition of the use of hats that hide the face, with the aim of reducing crime in the city.
From the 19th century to present day
On 27 October 1807, Charles IV and Napoleon I signed the Treaty of Fontainebleau, which allowed the passage of French troops through Spanish territory to join the Spanish troops and invade Portugal, which had refused to obey the order of international blockade against England. As this was happening, there was the Mutiny of Aranjuez (17 March 1808), by which the crown prince, Ferdinand VII, replaced his father as king. However, when Ferdinand VII returned to Madrid, the city was already occupied by Joachim-Napoléon Murat, so that both the king and his father were virtually prisoners of the French army. Napoleon, took advantage of the weakness of the Spanish Bourbons, forcing both, first the father then the son, to join him in Bayonne, where Ferdinand arrived on 20 April.
In the absence of the two kings, the situation became more and more tense in the capital. On 2 May, a crowd began to gather at the Royal Palace. The crowd saw the French soldiers pulled out of the palace to the royal family members who were still in the palace. Immediately, the crowd launched an assault on the floats. The fight lasted hours and spread throughout Madrid. Subsequent repression was brutal. In the Paseo del Prado and in the fields of La Moncloa hundreds of patriots were shot due to Murat's order against "Spanish all carrying arms". Paintings such as The Third of May 1808 by Goya reflect the repression that ended the popular uprising on 2 May.
The Peninsular War against Napoleon, despite the last absolutist claims during the reign of Ferdinand VII, gave birth to a new country with a liberal and bourgeois character, open to influences coming from the rest of Europe. Madrid, the capital of Spain, experienced like no other city the changes caused by this opening and filled with theaters, cafes and newspapers. Madrid was frequently altered by revolutionary outbreaks and pronouncements, such as Vicálvaro 1854, led by General Leopoldo O'Donnell and initiating the progressive biennium. However, in the early 20th century Madrid looked more like a small town than a modern city. During the first third of the 20th century the population nearly doubled, reaching more than 950,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.
The Spanish Constitution of 1931 was the first legislated on the state capital, setting it explicitly in Madrid.
Madrid was one of the most heavily affected cities of Spain in the Civil War (1936–1939). The city was a stronghold of the Republicans from July 1936. Its western suburbs were the scene of an all-out battle in November 1936 and it was during the Civil War that Madrid became the first European city to be bombed by aeroplanes (Japan was the first to bomb civilians in world history, at Shanghai in 1932) specifically targeting civilians in the history of warfare. (See Siege of Madrid (1936–39)).
During the economic boom in Spain from 1959 to 1973, the city experienced unprecedented, extraordinary development in terms of population and wealth, becoming the largest GDP city in Spain, and ranking third in Western Europe. The municipality was extended, annexing neighbouring council districts, to achieve the present extension of . The south of Madrid became very industrialized, and there were massive migrations from rural areas of Spain into the city. Madrid's newly built north-western districts became the home of the new thriving middle class that appeared as result of the 1960s Spanish economic boom, while the south-eastern periphery became an extensive working-class settlement, which was the base for an active cultural and political reform.
After the death of Franco and the democratic regime, the 1978 constitution confirmed Madrid as the capital of Spain. In 1979, the first municipal elections brought Madrid's first democratically elected mayor since the Second Republic. Madrid was the scene of some of the most important events of the time, such as the mass demonstrations of support for democracy after the foiled coup, 23-F, on 23 February 1981. The first democratic mayors belonged to the leftist parties (Enrique Tierno Galván, Juan Barranco Gallardo), turning the city after more conservative positions (Agustín Rodríguez Sahagún, José María Álvarez del Manzano, Alberto Ruiz-Gallardón and Ana Botella). Benefiting from increasing prosperity in the 1980s and 1990s, the capital city of Spain has consolidated its position as an important economic, cultural, industrial, educational, and technological centre on the European continent.