During Turkish times the palace became increasingly neglected and was finally destroyed in the great siege of 1686. In 1715 the medieval ruins were cleared. The building of the southern wing of the present-day palace was started in the eighteenth century during the reign of Maria Theresa, first to the plans of the chief court architect J. N. Jadot and later according to the designs of F. A. Hillebrandt and Ignác Oracsek. The other parts were built at the end of the nineteenth century, during the reign of Francis Joseph I, to the plans of Alajos Hauszman (1847-1926) and Miklós Ybl (1814-189I). (From 1790 the Palatine representing the Habsburg kings lived in the palaces.) In March 1800 Joseph Haydn conducted in it his oratorio The Creation.
In the siege of 1945 the palace collapsed and was burnt down. During its rebuilding the remains of the medieval palaces and fortifications were excavated. When completely reconstructed and repaired, the entire complex of buildings will serve cultural purposes.