During the reign of John II Casimir, the king, accompanied by his wife Marie Louise Gonzaga and the royal court, resided in the Duchy, after Poland was invaded by the Swedes in 1655. From Opole and Głogówek he commanded Polish forces. In the Franciscan church in Opole he issued the "Opole proclamation" in which he urged all Poles to the uprising against the Swedes.