
Historic Center: The Wall Madrid Built Over
75 min · 2.4 km · easy
Madrid is the capital of Spain because a king decided it should be. That is the whole story, and it is not the usual story.
Most European capitals earned the role. London sits on a tidal river that made it a port. Paris grew on trade and a defensible island in the Seine. Rome was Rome. Madrid had none of that. In 1561, when Philip II moved his court there, it was a landlocked town of roughly 20,000 to 30,000 people, with no major river, no port, no cathedral of consequence, and no commercial history that would have marked it out. Its single decisive advantage was where it sat: close to the geographic center of the Iberian Peninsula, roughly equidistant from the crowns Philip had inherited.
That origin is not a piece of trivia. It is the key to the entire city. A capital by decree has to be built, quickly, on top of a town that was never sized for the job. Everything Madrid became follows from that.
The town that got a court
When Philip II relocated his court from Toledo in 1561, he was not founding a city. He was overloading one. A royal court in the sixteenth century was an enormous machine: the monarch, the councils, the household, the clergy, the ambassadors, and the vast service population that fed, dressed, housed, and moved them all. Dropping that machine onto a town of 20,000 multiplied its population within a generation.
The court even wavered. Under Philip III it moved to Valladolid from 1601 to 1606, a brief experiment that failed, and then returned to Madrid for good. Since 1606 the capital has never moved again. But the near-miss is telling. Madrid's status was a decision that could be reversed, which is exactly what a capital of geography and commerce cannot be.
The consequence you can still walk is the split between the imperial center and the neighborhoods built to serve it. The El Rastro and Lavapiés tour walks down the southern slope below the old town, where the city kept the work it needed but did not want next door: slaughter and tanning, a royal tobacco factory, and the crowded tenements of the people who worked there. We tell that story in El Rastro and Lavapiés: down the hill to the factory gate. It is the same capital seen from the working end.
The Habsburg town
Hear a stop from this walk
Puerta Cerrada: The Closed Gate
The Habsburgs ruled Spain from 1516 to 1700, and their Madrid was a court city organized around ritual and religion. You can read their priorities in the squares they left. Plaza Mayor, built between 1617 and 1619 under Philip III by the royal architect Juan Gómez de Mora, was a purpose-built ceremonial stage, an enclosed rectangle where the court staged its public life: festivities, bullfights, beatifications, coronations and the occasional auto-da-fé. Plaza de la Villa, a few blocks west, gave the town council its house, begun in 1644 and finished in 1696 with the town jail inside. The Historic Center tour walks both squares, along the line of the medieval wall the Habsburg town grew out of.
What the Habsburgs did not build is as revealing as what they did. They never replaced the old fortress, the Alcázar, with a palace worthy of a global empire. They governed a court, not a planned city. Their Madrid is dense, inward, and ceremonial, a capital measured in processions.
The Bourbon rewrite
In 1700 the Habsburg line died out and the French Bourbons took the Spanish throne. They inherited a court capital and set about turning it into an enlightenment one. The turning point was literal fire: the Habsburg Alcázar burned on Christmas Eve 1734, and rather than restore it, the Bourbons commissioned an entirely new Italian-designed royal palace on the ashes. The Palacio Real that stands today is the dynastic break rendered in stone, and the Royal Palace and Temple of Debod walk goes round it on three sides.
The Bourbons kept going. Under Charles III, in the 1760s and 1770s, they joined a string of meadows into one tree-lined promenade with fountains at Cibeles, Apollo and Neptune, and set institutions of science beside it: a natural history cabinet that became the Prado, and a botanic garden. This is the enlightenment idea of a capital, one that displays knowledge and civic order rather than only court ceremony. The Paseo del Prado tour walks that boulevard and the buildings along it that have changed their jobs since.
The royal park beside that boulevard tells the end of the story. The Buen Retiro was built for Philip IV in the 1630s; people had long been let into much of it by permission, and in November 1868, after Isabel II had been deposed, the revolutionary government handed the whole estate to the city. The Retiro Park walk follows that garden from royal retreat to public park.
Why the decree still explains the city
A capital by decree never stops being one. Because Madrid was made rather than grown, it kept absorbing whatever the state required. The court summoned labor, so the slopes below the old town filled. The enlightenment monarchy wanted institutions, so the museum mile appeared. The city drew in the people it needed because that is what a capital does when it was never a market town.
Toledo has a cathedral older and grander than anything in central Madrid. Seville had the river and the wealth of the Americas. Barcelona had the sea. Madrid had a king's decision and the geometric center of a peninsula. Everything else, the palace, the boulevard, the museums, the neighborhoods, is what a court builds when it has to conjure a capital out of a town.
Walk the old town and you are walking the decree.
To see every Madrid route side by side, start with our guide to the best self-guided walking tours in Madrid.
Frequently asked questions
- Why is Madrid the capital of Spain?
- Madrid became the capital because Philip II moved his court there in 1561. It was not a natural capital: it had no port, no major river, and no great commercial history. Its main advantage was its position near the geographic center of the Iberian Peninsula, roughly equidistant from the crowns Philip had inherited. The capital was a royal decision, not the outcome of trade or population growth.
- Was Madrid always the capital of Spain?
- No. Before 1561, the Spanish court moved with the monarch and often sat in Toledo, Valladolid, or Seville. The court briefly relocated to Valladolid from 1601 to 1606 under Philip III, then returned to Madrid permanently. Madrid has been the continuous capital since 1606.
- What is the difference between Habsburg and Bourbon Madrid?
- The Habsburgs (1516 to 1700) built Madrid as a court city organized around ceremony and religious institutions, leaving squares like Plaza Mayor and Plaza de la Villa. The Bourbons, who took the throne in 1700, rebuilt Madrid as an enlightenment capital, adding the Palacio Real, the tree-lined Paseo del Prado boulevard, and public institutions like the Prado building and Botanical Garden.
- How big was Madrid when it became the capital?
- Madrid was a modest town of roughly 20,000 to 30,000 people in 1561. The arrival of the court multiplied its population within decades, drawing in labor, servants, clergy, and courtiers, and the city spread down the slopes below its old walls.
Ready to experience it?

Historic Center: The Wall Madrid Built Over
75 min · 2.4 km · easy
More from Madrid
Explore more at your own pace.

Barrio de las Letras: Madrid's Writers' Quarter in Three Layers

Gran Vía: How Madrid's Great Way Grew Wider and Taller as It Was Cut

Malasaña and Chueca: Madrid's Old Northern Edge, Taken Back by the City

Edificio Carrión: The Curved Corner at Callao and the Sign That Stayed

Plaza de las Cortes: Cervantes, His Lion and the Congreso Lions

