It is estimated that in the later 10th century the population of the fortified settlement was about 200. At the start of the 11th century the settlement was rebuilt (and enlarged) after suffering destruction caused by a flood, one of many which would periodically affect Poznań throughout history. In 1038 the invading Bretislaus I, Duke of Bohemia, sacked and burnt the settlement. It was rebuilt under Casimir I the Restorer, but the country's capital was now moved to Kraków, and the Greater Poland settlements of Poznań and Gniezno lost their primary political importance. With the building of the Royal Castle and the walled city of Poznań on the left bank of the Warta in the second half of the 13th century, Ostrów Tumski became the exclusive domain of the bishops. Sometime before 1335 it obtained separate town rights. A separate settlement on the island to the south of the cathedral became known as Zagórze. Of particular importance for the development of the island was Jan Lubrański, bishop of Poznań from 1498 until his death in 1520 (he was also a lawyer and diplomat). In 1518 he founded the Lubrański Academy, which served as an institution of higher education (but without the right to award degrees) until 1780. Its building was built in 1518–1530 to the west of the cathedral (today the archdiocese museum). Lubrański also built a Psalmodists' House, originally for 12 psalm singers (this building also survives). He also constructed water pipes and paved streets, and in 1504–1512 built defensive walls around the central part of the island. The walls were not as high or imposing as the walls around the left-bank city of Poznań; they were mostly taken down at the start of the 18th century, and the remainder demolished in the 19th century during the building of the Prussian fortifications. The cathedral, which had been rebuilt in Gothic style in the 14th and 15th centuries, was seriously damaged by a fire in 1622, after which it was rebuilt in Baroque style. After another major fire in 1772, rebuilding was carried out in Neoclassical style. The Poznań region was taken over by Prussia in the Second Partition of Poland of 1793. According to figures compiled in the following year, the population of Ostrów Tumski at that time was 304.