After the golden age came a long season of conflict. In 1515, after the French victory at the Battle of Marignano, the defeated Maximilian Sforza and his Swiss mercenaries retreated into the castle. King Francis the First of France followed them to Milan, and his sappers placed mines under the foundations. The defenders surrendered. Later, Francesco the Second Sforza briefly returned to power, restored and enlarged the fortress, and adapted part of it as a home for his wife, Christina of Denmark. Under the Spanish, the castle became a citadel, and in 1535 the governor's seat moved to the Ducal Palace. It later served as a Spanish and Austrian military stronghold. In the early nineteenth century Napoleon ordered the outer ring of defensive walls cleared, and that open ground became Parco Sempione, which is why the park and the castle now flow into each other. In the late nineteenth century there was even debate about demolishing the castle for housing. Preservation won. The Municipality of Milan acquired the complex on 25 October 1893, and the architect Luca Beltrami led a restoration to recover its Sforza-era look, including the reconstruction of the Torre del Filarete, finished in 1905.