Why Madrid Is the Capital of Spain: Philip II and the 1561 Court Move
Madrid became Spain's seat of power when Philip II settled the royal court there in 1561. How a Moorish fortress town got there, and the short spell the court left.

Madrid is the capital of Spain because the royal court of the Habsburg monarchy settled there in 1561, under King Philip II. Before that, Spain had no fixed capital: the court travelled between towns such as Valladolid, Toledo and Madrid. Once the court stayed put, Madrid grew into the country’s administrative centre, and apart from a few years when the court moved away under Philip II’s son, it has kept that role ever since.
How did Madrid start?
Madrid began as a fortress. According to the History of Madrid article on Wikipedia, its first walled core was built in the late 9th century, sometime between 852 and 886, on the steep left bank of the Manzanares river. It was a military outpost of Muhammad I, emir of Córdoba, and its Arabic name was Majriṭ. The settlement covered roughly 8 ha and included an alcázar (a fortified palace) and a walled citadel.
Its value came from its position near Toledo. Madrid helped block help from the Christian north reaching Toledo’s rebellious population, and by the late 10th century it was an important border stronghold.
Christian forces took Madrid in 1083 or 1085; historians still debate which. The town’s mosque became the church of the Virgin of Almudena, a name that survives in Madrid’s cathedral today.
Why did kings like Madrid before 1561?
Through the Late Middle Ages, Madrid was a mid-ranking town of the Crown of Castile, living mostly from farming, with irrigated crops and trades in building materials and leather. It held one of the 18 votes in the Cortes of Castile, the kingdom’s parliament.
In the 15th century it became a favourite stop for the Trastámara kings. Henry IV of Castile spent more time there than anywhere else and died in the town. The kings came for the hunting in the surrounding countryside, the strategic location and the solid alcázar, which often held the Royal Treasure. Madrid even had a mint that struck coins from 1467 to 1471.
The Catholic Monarchs, Ferdinand and Isabella, often brought the court to Madrid as well. Reports say they spent more than 1000 days in the town, including one unbroken stay of 8 months.
What did Philip II decide in 1561?
Philip II, a member of the House of Habsburg, became King of Spain in 1556, according to his Wikipedia biography. He was born in Valladolid on 21 May 1527, at the time the Castilian capital, and grew up in the Castilian court. He thought of himself as Spanish and preferred to live in the Spanish kingdoms.
In 1561 he settled the court in Madrid. The court was the government: the king, his councils, his secretaries and the nobles and officials around them. Where the court stayed, offices, embassies and the people serving them followed, and the town grew fast. The Wikipedia history of the city dates Madrid’s development as an administrative centre from that year.
Philip II never issued a formal law naming Madrid the capital. The choice was a matter of where the court lived, which is why historians talk about the court “settling” in Madrid rather than a capital being declared. The town was central within the peninsula, already familiar to earlier monarchs and close to royal hunting grounds. Philip II also built the royal palace and monastery of El Escorial in the mountains northwest of the city, finishing it in 1584.
When did the court leave Madrid?
The court left Madrid once for a longer period. Under Philip III, who succeeded Philip II, the court moved to Valladolid for a few years and then returned to Madrid. After that return, Madrid stayed the seat of the monarchy and later of Spain’s governments.
For the exact years of the move, check a history of Philip III’s reign.
What remains of this history in Madrid today?
The old Moorish and medieval town sat around today’s Royal Palace and Almudena Cathedral, above the Manzanares. As the capital, Madrid is also the stage for several national traditions, from New Year’s Eve at Puerta del Sol to state holidays. Our guide on why Spain eats twelve grapes at Sol covers one of them, and the story behind Spain’s Constitution Day holiday covers a modern one.
Quick answers
Was Toledo ever the capital of Spain?
Before 1561, Spain had no permanent capital and the court moved between cities, Toledo and Valladolid among them. Philip II himself was born in Valladolid, then the Castilian capital.
Who founded Madrid?
Madrid grew from a fortress built for Muhammad I, the emir of Córdoba, in the late 9th century, between 852 and 886.
Did Madrid have a mint?
Yes, briefly. A medieval mint in the town made coins from 1467 to 1471.
Did the court ever leave after 1561?
Yes. Under Philip III it moved to Valladolid for a few years before coming back to Madrid for good.
Checked against official sources in November 2026. Hours, prices and rules change: confirm on the official page before you go or apply.



