1521, but the defense was very effective. They contained one failed assault. There is a connection between the history of the castle, the city of Olsztyn, and Nicolaus Copernicus. He prepared the defense of Olsztyn against the invasion of the Teutonic Knights. In the sixteenth century, there were two prince-bishops of Warmia that stayed there: Johannes Dantiscus – the first sarmatian poet, endowed with the imperial laurel wreath for "Latin Songs" (1538, 1541) and Marcin Kromer, who wrote with equal ease in Latin and Polish scientific and literary works (1580). Kromer consecrated the chapel of St. Anna, which was built in the south-west wing of the castle. In the course of time, both wings of the castle lost military importance, which for residential purposes has become very convenient. In 1779, Prince-Bishop Ignacy Krasicki stopped here as well. After the Prussian annexation of Warmia during the First Partition of Poland in 1772, the castle became the property of the state board of estates (War and Domain Chamber, Kriegs- und Domänenkammer). In 1845, the bridge over the moat was replaced by a dam better connecting the castle with the city. In 1901–1911 a general renovation of the castle was performed, however, several sections of the building were violated at the same time where they changed the original look of the castle e.g. putting on window frames in a cloister. The tower was crowned in 1921 and again in 1926 in the halls of the castle, became a museum. In 1945, the whole castle became home to the Masurian Museum, which today is called the Museum of Warmia and Masuria. In addition, there are also popular events held within the frameworks of the Olsztyn Artistic Summer and so-called "evenings of the castle" and "Sundays in the Museum". Jewish community Although Jews were permitted to trade in the city itself and its fairs during the medieval times, yet they were restricted from trading freely in the villages surrounding the town. In 1718, Bishop Teodor Andrzej Potocki imposed a ban on Jewish trade in the city as well. The ban, even if continued by successive bishops, proved not to be particularly successful in the light of repeated complains by the local merchants about Jewish dealing in animal leather and similar products as the one recorded in 1742. Permanent Jewish settlement can be dated to 1780 when the Jews were finally permitted to settle in the