Royal Palace of Madrid, large 18th-century palace in downtown Madrid that is the official residence of the Spanish royal family, although the family does not live there but in the Palacio de la Zarzuela on the fringes of the city. The Royal Palace of Madrid is, however, used for state functions, and when it is not in use, parts of it are open to the public.
The palace stands on a site first occupied by a 9th-century Islamic fortress built by Mohammed I, Emir of Córdoba, to protect Toledo. that was later used sporadically by the kings of Castile when the Spanish regained control of the city in 1083. King Philip II of Spain moved the royal court there in 1561. The fortress then gave way to a castle known as the Antiguo Alcázar, or Old Castle, in the 16th century.
After the building burned down in 1734, King Philip V decided to have a new palace built in the same locale. The new structure was made entirely of stone and brick rather than wood, in order to minimize the risk of fire. Building work started in 1738 and was completed in 1764. A number of architects were involved in the project, including renowned Italian architect Francisco Sabatini, and the magnificent gardens that lie to the north of the palace were named in his honour. The building was first used as a royal residence by King Charles III in 1764. Later remodeling was undertaken by King Ferdinand VII and by his grandson, King Alfonso XII. The last king to make his home in the Royal Palace was Alfonso XIII.
The vast palace measures 1.5 million square feet (135,000 sq m) and has more than 1,400 rooms. It is home to a number of important artworks by painters such as Francisco Goya, Giovanni Battista Tiepolo, Diego Velázquez, and Caravaggio, as well as a collection of musical instruments made by master craftsmen, including the only complete Stradivarius string quartet in the world. The palace is also notable for its collection of armour in the Real Armería, or Royal Armoury, which dates back to the 16th century.