The capital of Spain is Madrid. It lies on the small River Manzanares near the geographic centre of the Iberian Peninsula, on a plateau about 660 metres above sea level, and it is also the capital of the surrounding Community of Madrid. The city proper had over 3.4 million people in 2025 and the metropolitan area about 6.8 million, making Madrid the second-largest city in the European Union after Berlin. Unlike most European capitals, it was not an old royal or religious centre. It was a modest Castilian town until June 1561, when Philip II set up his court in its fortress, and almost everything about the city, from where its cathedral stands to where Spain's roads begin, follows from that decision.
Power: From the Alcázar of 1561 to the Congress Lions and Kilometre Zero
Madrid began as a fortress. In the second half of the 9th century the Umayyad emir Muhammad I of Córdoba built a stronghold on a headland above the Manzanares, one of a line of forts guarding Toledo against Christian kingdoms to the north. Alfonso VI of León and Castile captured it in 1083 as a stepping stone to Toledo, which fell in 1085. For the next five centuries Madrid was a royal town of Castile, where the Cortes met from time to time, but it was not a capital.
That changed in June 1561, when Philip II installed his court in the old alcázar. Apart from a short break between 1601 and 1606, when the court moved to Valladolid and Madrid's population collapsed, Madrid has been the capital ever since. Its central position suited a monarchy that governed from a single fixed seat, and in the 18th century the Bourbon kings invested heavily in roads radiating from it across the country. Madrid's nickname, La Villa y Corte, "the town and the court", describes that origin: a town that existed to serve a royal household and its government.
The alcázar burned down on Christmas Eve 1734. On the same site the Bourbons built the present Royal Palace between 1738 and 1755, to a design begun by the Italian architect Filippo Juvarra. With more than 135,000 square metres of floor space and 3,418 rooms, it is the largest royal palace in Europe. It remains the official residence of the Spanish royal family, though it is used mainly for state ceremonies.
Charles III, who reigned from 1759 to 1788 and is remembered as "the best mayor of Madrid", tried to make the city worthy of its role, with sewers, street lighting, cemeteries outside the walls and new monuments. His equestrian statue stands in the Puerta del Sol. On the pavement in front of the Real Casa de Correos, an 18th-century post office that is now the office of the President of the Community of Madrid, a plaque marks Kilometre Zero, the point from which distances on Spain's radial road network are measured, and the square was once the meeting point of the country's six main radial roads.
Parliamentary power came later. Spain's lower house, the Congress of Deputies, meets in the Palacio de las Cortes near the Paseo del Prado, a neoclassical building by Narciso Pascual Colomer opened by Queen Isabella II on 31 October 1850. Its steps are guarded by two bronze lions cast in 1866 from cannons captured in the African War of 1859 to 1860. Madrileños call them Daoíz and Velarde, after two artillery captains killed in the uprising of 2 May 1808 against Napoleon's troops. On 23 February 1981 Lieutenant-Colonel Antonio Tejero and about 200 armed Civil Guards stormed the chamber and held the deputies hostage for 18 hours in a failed coup. Madrid's hardest years as a capital came earlier, in the Civil War, when Franco's Nationalist forces besieged the Republican-held city from October 1936 until it fell on 28 March 1939.
Faith: Almudena Cathedral, San Isidro and a Capital Without a Bishop Until 1885
For a city at the heart of a Catholic monarchy, Madrid had a strange religious gap. When the court moved there in 1561, the leading see of the Church in Spain stayed in Toledo, and the new capital had no cathedral and no bishop of its own. Plans for a cathedral dedicated to the Virgin of the Almudena were discussed from the 16th century, but the costs of empire always came first.
Madrid did not become a diocese until Pope Leo XIII issued a bull in 1885 creating the see of Madrid-Alcalá, and it was raised to an archdiocese only in 1991. The foundation stone of the Almudena Cathedral had been laid in 1883, originally for a parish church, and the plans were then enlarged to a Gothic Revival cathedral designed by Francisco de Cubas. Work stopped during the Civil War and did not resume until 1950, when Fernando Chueca Goitia redesigned the exterior in a Baroque-influenced style to match the grey and white stone of the Royal Palace directly opposite. The cathedral was finally consecrated by Pope John Paul II in 1993, more than four centuries after Madrid became capital. It is believed to stand on the site of a medieval mosque destroyed after Alfonso VI's conquest in 1083. King Felipe VI was married there on 22 May 2004.
The city's patron saint is a farm labourer. Isidore the Laborer, San Isidro Labrador, was a Mozarab farmworker born in Madrid around 1070 or 1082, and his feast day on 15 May is one of the city's most celebrated holidays. He is also one of the cathedral's two patrons, alongside the Virgin of the Almudena. Before the cathedral was consecrated, the church of San Isidro served as Madrid's pro-cathedral and is now a basilica. Religious practice has weakened, as elsewhere in Spain: in a 2019 survey, about 21 per cent of Madrid respondents called themselves practising Catholics, while about 46 per cent described themselves as non-practising.
Trade: Plaza Mayor, the Rastro and the Towers of the Castellana
Madrid's economy grew from the court rather than from a port, a river trade or an industry. After 1561 it was more a place of consumption than production, and most economic activity went into supplying the royal household, the government and a fast-growing population. Banking and publishing were early specialities. The effect on the town was immediate.
The centre of that commerce was the Plaza Mayor. In the 15th century the site was the Plaza del Arrabal, the town's main marketplace. Philip II had Juan de Herrera draw up plans for a formal square, but construction started only in 1617 under Philip III, led by Juan Gómez de Mora, and finished in 1619. The square measures 129 by 94 metres, with 237 balconies looking down on it. Its best-known building, the Casa de la Panadería, takes its name from the main city bakery that it once housed.
The plaza was also a stage for power and faith. On 30 June 1680, an auto-da-fé held there saw 117 people sentenced by the Spanish Inquisition, 21 of them to be burned. It burned itself three times, in 1631, 1670 and 1790. The third fire destroyed nearly a third of the square, and Juan de Villanueva's rebuilding lowered the surrounding houses from five storeys to three and closed off the corners, giving the square the uniform look it has today.
A short walk south, in the old working districts, the Rastro flea market fills the Plaza de Cascorro and the sloping Ribera de Curtidores every Sunday and public holiday. The street's name means "riverbank of the tanners", and the market's own name, "the trail", probably comes from the trail of blood left as cattle were hauled from a slaughterhouse near the Puerta de Toledo to the tanneries.
Modern trade runs along a different axis. A large industrial sector did not develop until the 20th century, but Madrid is now dominated by services and finance. Its stock exchange hosts the IBEX 35 index, and the metropolitan area is home to major companies such as Telefónica, Iberia and BBVA. The Paseo de la Castellana, laid out in 1833 beside a stream that had been channelled in 1807, and pushed north in the 1930s and under Franco, is the spine of that economy. At its northern end, on land once used by Real Madrid, stands the Cuatro Torres Business Area, whose four towers, finished in 2008, are the tallest buildings in Spain.
Daily Life: The Retiro, the Twelve Grapes at Sol and a 660-Metre Plateau
Madrid's altitude shapes how people live in it. The city has a cold semi-arid climate, shading into a Mediterranean one in the west. Winters are cool, with frequent frosts and occasional snow; in January 2021 a storm left between 50 and 60 centimetres in the city, the heaviest snowfall since records began in 1904. Summers are hot and dry, with July afternoons averaging 32 to 34 °C and heat waves reaching 40 °C. The record in the Retiro was 40.7 °C on 14 August 2021. Madrid is among the sunniest capitals in Europe, and outdoor life stretches late into the evening.
The main escape from that heat is the Buen Retiro Park, 1.4 square kilometres of gardens beside the Prado Museum. It began as a royal retreat attached to the monastery of San Jerónimo, was enlarged under Philip II and extended again in the 1620s on land given by the Count-Duke of Olivares, and belonged to the crown until the revolution of 1868 opened it to the public. Since 2021 the park and the Paseo del Prado have formed a combined UNESCO World Heritage Site. The avenue is also the axis of the "Golden Triangle of Art": the Prado, founded in 1819 from the royal collections, the Reina Sofía and the Thyssen-Bornemisza.
The Puerta del Sol, pedestrianised in 2020, is where the whole country gathers once a year. On New Year's Eve the clock on the Real Casa de Correos rings in the year, and Spaniards eat twelve grapes, one for each chime. The ritual has been broadcast live on radio and television from Sol since 31 December 1962. Getting around the city is easier than in most European capitals: the Metro, opened in 1919, has 296.6 kilometres of conventional lines, the third-longest network in Europe after Moscow and London.
Madrid's role as a capital that grew out of a court, rather than a court that settled in an existing great city, explains much of its character. For more on the river, the plateau and the mountains around it, read our guide to Madrid's geography. How the parliament in the Palacio de las Cortes fits into Spain's constitutional monarchy is covered in our guide to the government of Spain, and if you are planning a trip around the heat and the fiestas, see our advice on the best time to visit Madrid.
Quick Facts About Madrid
- Country: Spain
- Continent: Europe (Southern Europe)
- Country population: approximately 47.9 million
- Capital city status: Madrid is the capital of Spain, the seat of national government, and the location of foreign embassies, parliament, and the head of state's official residence.
Frequently Asked Questions
What is the capital of Spain?
The capital of Spain is Madrid. Madrid is the seat of national government, hosts most foreign embassies and consulates, and is typically where the head of state and parliament are located.
What continent is Madrid in?
Madrid, the capital of Spain, is located in Europe, in the Southern Europe region. As Spain's capital, Madrid serves as the country's primary connection to the broader Europen political, economic, and cultural sphere.
Why is Madrid the capital of Spain?
Madrid was chosen as the capital of Spain for reasons that typically combine geography, history, and politics. Capital city selections often reflect a desire for centrality (being accessible from across the country), historical importance (being a longstanding seat of government or culture), or neutrality (being acceptable to multiple regions or ethnic groups within the country). The specific reasons for Madrid's designation are detailed in the city's history above.
What is Madrid known for?
As the capital of Spain, Madrid is best known for housing the country's central government institutions — parliament, presidential or royal residences, supreme court, and key ministries. It is also typically a major cultural and economic center within Spain, hosting national museums, embassies, and signature monuments. The introduction and history sections above provide detailed coverage of the city's specific notable institutions and landmarks.
Related Pages
- Spain Country Guide — full geography, climate, economy, and culture overview
- Flag of Spain — meaning, history, and design of Spain's national flag
