The first extension to the building was completed in 1537 and was commissioned by King Charles I. Its exterior was constructed by the architect "Juan Gómez de Mora" in 1636, commissioned by King Philip IV.