sandstone from Scania, and the new castle was given a roof with copper sheeting. James VI of Scotland stayed in the castle in 1590 after his marriage to Anne of Denmark. King James gave 2,000 Danish dalers in gold coins to the officers and servants in the castle as a reward. Fire of 1629 In 1629, a moment's carelessness by two workmen caused much of the castle to go up in flames in the night between the 24 and 25 September. Only the chapel was spared by the strength of its arches. King Christian IV put great efforts into restoring the castle. Already in 1631, the work was underway, led by the architect Hans van Steenwinckel the Younger. By 1639, the exterior — which in keeping with the king's wish was reconstructed without major changes — was once again magnificent, but the interior never fully regained its former glory. Furthermore, certain modernizations were made, and portals, chimneypieces, ceiling paintings and other decorations were renewed in Baroque style. Swedish conquest of 1658 During the Dano-Swedish War of 1658–60, Kronborg was besieged, attacked and conquered by a Swedish army commanded by Carl Gustaf Wrangel. During the Swedish occupation, the queen of Sweden, Hedvig Eleonora of Holstein-Gottorp and the Swedish king's sister Maria Eufrosyne of Pfalz lived at Kronborg, where they were visited by Charles X of Sweden during the campaign and entertained the foreign ambassadors. As a result of the Swedish occupation, Kronborg was deprived of many of its most precious art works, including the richly decorated fountain in the castle courtyard, Frederick II's canopy and a number of the large ceiling paintings commissioned by Christian IV for the ballroom. Garrison fortress The Swedish conquest of Kronborg in 1658 demonstrated that the castle was far from impregnable. Afterwards, the defences were strengthened significantly. From 1688 to 1690, an advanced line of defence was added called the Crownwork. Shortly afterwards, a new series of ramparts were built around it. After their completion, Kronborg was considered the strongest fortress in Europe. From 1739 until the 20th century, Kronborg was used as a prison. The inmates were guarded by the soldiers billeted in the castle. The convicts had been sentenced to work on the castle's fortifications. The convicts were divided into two categories: those with minor sentences were categorised as "honest" and were allowed to work outside the castle walls; those serving sentences for violence,