The Alcazar was originally a 9th-century Muslim fortress in Madrid that was gradually expanded, especially in the 16th century, into palace for the Spanish royal family. The palace held an art collection of nearly 2000 objects by the time when the Alcazar was destroyed by fire in 1734. Part of the collection fortunately had already been moved to the Buon Retiro Palace, a secondary royal residence at the eastern edges of Madrid, because of construction on the Alcazar, but nearly 500 of the total artworks that remained at the Alcazar were destroyed. The Royal Palace was built at the site of the Alcazar.
Fernando Checa Cremades, El Real Alcázar de Madrid: dos siglos de arquitectura y coleccionismo en la corte de los reyes de España (Madrid: Comunidad de Madrid, 1994).