Sometime between 11th and 13th century the town was conquered and subsequently annexed by the East Slavic Ruthenians from the weakened and fragmented Polish state (see Testament of Bolesław III Wrymouth). Polish rulers of the Piast dynasty recaptured Rzeszów in 1264. In Tarnów, there was a meeting of Prince Bolesław V the Chaste, and Prince Daniel of Kingdom of Galicia–Volhynia, during which both sides agreed that the border would go between Rzeszów and Czudec (Rzeszów belonged to Kingdom of Galicia–Volhynia, while Czudec and Strzyżów to Lesser Poland). After the reunification of Poland following the fragmentation period, Rzeszów remained in Ruthenian hands until 1340, when King Casimir III the Great eventually recaptured the area, inviting his knights to govern the re-acquired land. According to some sources, at that time Rzeszów was inhabited by the Walddeutsche, and was called Rishof (during World War II, the Germans renamed it Reichshof). The town was granted Magdeburg rights, it had a parish church, a market place and a cemetery, and its total area was some 1,5 km2. Magdeburg rights entitled Rzeszów's local authorities to punish criminals, build fortifications and tax merchants. In 1458 Rzeszów was burned by the Vlachs and the Tatars. In 1502 the Tatars destroyed it again. Earlier, in 1427, Rzeszów had burned to the ground in a big fire, but the town recovered after these events, thanks to its favorable location on the main West – East (Kraków – Lwów) and North – South (Lublin – Slovakia) trade routes. In the 15th century the first Jews settled in Rzeszów. The 16th century was the time of prosperity for the town, especially when Rzeszów belonged to Mikołaj Spytek Ligęza (since the 1580s), who invested in infrastructure, building a castle, a Bernardine church and a monastery. Rzeszów then had some 2,500 inhabitants, with a rapidly growing Jewish community. The town was granted several royal rights, including the privilege to organise several markets a year. At that time, Rzeszów finally grew beyond its medieval borders, marked by fortifications. In 1638 Rzeszów passed into the hands of the powerful and wealthy Lubomirski family, becoming the center of its vast properties. At first, the town prospered and in 1658, the first college was opened there, which now operates as High School Nr 1. The period of prosperity ended, and furthermore, there were several fires and wars, which destroyed the town. Rzeszów was first captured by the Swedes