Although the site of modern-day Madrid has
been occupied since pre-historic times, in the Roman age
this territory belonged to the diocese of Complutum
(present-day Alcalá de Henares). But the first historical
data on the city comes from the 9th century, when Muhammad
I ordered the construction of a small palace in the same
place that is today occupied by the Palacio Real. Around
this palace a small citadel, al-Mudaina, was built. Near
that palace was the Manzanares, which the Muslims called
From this came the naming of the site as Majerit, which
was later rendered to the modern-day spelling of Madrid).
The citadel was conquered in 1085 by Alfonso VI of Castile
in his advance towards Toledo. He reconsecrated the mosque
as the church of the Virgin of Almudena (almudin, the
garrison's granary). In 1329, the Cortes Generales first
assembled in the city to advise Ferdinand IV of Castile.
Sephardi Jews and Moors continued to live in the city
until they were expelled at the end of the 15th century.
After troubles and a large fire, Henry III of Castile
(1379–1406) rebuilt the city and established himself
safely fortified outside its walls in El Pardo. The grand
entry of Ferdinand and Isabella to Madrid heralded the end
of strife between Castile and Aragon.
The Kingdom of Castile, with its
capital at Toledo, and the Crown of Aragon, with its
capital at Zaragoza, was welded into modern Spain by the
Catholic Monarchs (Queen Isabella of Castile and King
Ferdinand II of Aragon). Though their grandson Charles I
of Spain (also known as Charles V, Holy Roman Emperor
favoured Madrid, it was Charles´ son, Philip II
(1527–1598) who moved the court to Madrid in 1561.
Although he made no official declaration, the seat of the
court was the de facto capital. Sevilla continued to
control commerce with Spain's colonies, but Madrid
controlled Sevilla. Aside from a brief period, 1601-1606,
when Felipe III installed his court in Valladolid,
Madrid's fortunes have closely mirrored those of Spain.
During the Siglo de Oro (Golden Century), in the 16th/17th
century, Madrid had no resemblance with other European
capitals: the population of the city was economically
dependent on the business of the court itself
Renaissance and early modern Madrid
Felipe V, Spain's first Bourbon King and, therefore,
French, decided that a European capital could not stay in
such a state, and new palaces (including the Palacio Real
de Madrid) were built during his reign. However, it would
not be until Carlos III (1716–1788) that Madrid would
become a modern city.
Carlos III was one of the most popular and benevolent
Kings in the history of Madrid. He was popularly known at
the time (and henceforth) as Madrid's best mayor. When
Carlos IV (1748–1819) became King of Spain, the people of
Madrid revolted. After the Mutiny of Aranjuez, which was
led by his own son Fernando VII against him, Carlos IV
resigned, but Fernando VII's reign would be short:
In May 1808 Napoleon's troops
entered the city. On May 2, 1808 (Spanish: Dos de Mayo)
the Madrileños revolted against the invading French army,
whose brute reaction would have a lasting impact on French
rule in Spain and France's image in Europe in general.
After the war of independence (1814)
Fernando VII came back to the throne, but soon after, a
liberal military revolution, Colonel Riego made the King
swear allegiance to Spain's new (and first) Constitution.
This would start a period where liberal and conservative
governments alternated in power that would end with the
enthronement of Isabel II (1830–1904).