The first inhabitants of Madrid were Muslim soldiers under the command of Muhammad I. The founding of the city is usually dated to AD 852 when a fortress (alcázar) was built on the escarpment now occupied by the Palacio Real. Few traces of this early settlement survive, apart from a small section of the city wall (see The Best of the Rest).
Muhammad I had his fortress built to guard against attack from northern Christian armies, and to protect the important city of Toledo. In 1083 Toledo fell and the Alcázar of Madrid was surrendered without a fight. The new Christian settlers lived harmoniously with their Arab neighbours, but mosques were changed to churches.
In 1561 Felipe II took the decision to make Madrid his new capital (previously Valladolid had been preferred). The central location and proximity to other royal residences were determining factors. Madrid was still a small, squalid town of 9,000 inhabitants – one of the king’s first decisions was to transform the old marketplace outside the walls into a public square, now Plaza Mayor.
By the time that Plaza Mayor was completed (1619) Madrid’s population had swollen to around 85,000. Courtiers, noblemen, clerics and criminals descended on the city, leading to such overcrowding that Felipe IV ordered the building of a new perimeter wall. Madrid provided rich material for the playwrights of the Golden Age, including Lope de Vega and Tirso de Molina.
Madrid thrived during the reign of Carlos III (1759–88). He gave the city magnificent gateways such as the Puerta de Alcalá, and imposing thoroughfares such as the Paseo del Prado. Streets were paved and lit, sewers were dug and nightwatchmen introduced. He became known as El Rey-Alcalde (the Mayor-King).
On 2 May 1808, two months after a French army occupied the city, the people of Madrid rose in revolt. Fierce street battles were fought, while the troops of the Monteleón barracks mutinied in support of the rebels. But within a few hours, the insurrection had been crushed and the leaders were executed by firing squad.
In 1919 Alfonso XIII opened Madrid’s first metro line and the city was – literally – on the move again, after decades of inertia. Whole streets were demolished to make way for the Gran Vía’s bars and restaurants, and Calle de Alcalá became the heart of a new financial district.
Three months into the Spanish Civil War, General Franco’s Nationalist army surrounded Madrid. Republican resistance was fierce and the siege dragged on for two-and-a-half years, with the city eventually only falling to the rebel forces in March 1939.
After ruling Spain with an iron fist for 36 years, General Franco died in November 1975, leaving power in the hands of his designated successor, Prince (later King) Juan Carlos I. The first democratic elections were held in June 1977.
On 23 February 1981, Franco loyalists under Colonel Antonio Tejero attempted a coup. Tejero forced his way into the parliament building, firing shots into the air. The conspiracy collapsed when the king confirmed that the army had remained loyal.
According to some historians, Muhammad I’s son was the true founder of the city.
This devout farm labourer inspired miracles after his death in 1172 and became the city’s patron saint.
When in Madrid, the king stayed in the Alcázar or with the monks of San Jerónimo Monastery.
Spain’s greatest playwright was banned from Madrid for eight years after libelling the father of his former lover.
Madrid’s “best mayor” spent little of the first part of his reign in the city, but his long-term impact is undeniable.
With Pedro Velarde, Daoíz led the insurrection against the French in 1808, and died in the fighting.
Detested during his short reign as King of Spain (1808–13), he did plan one of the city’s finest squares, Plaza de Oriente.
One of the most courageous commanders defending Madrid during the Civil War.
Statues around the city that once honoured the former dictator have all been removed.
Madrid’s most popular mayor ran the city from 1979 until his death in 1986, during a time of great cultural change.