The first historical mention of Chortkiv dates to 1522, when Polish King Sigismund I the Old granted an ownership order for Jerzy Czortkowski over the town and allowed him to name it after himself—"Czortków". The small community, numbering at 50 families, were almost all massacred during the Chmielnicki Uprisings of 1648–9. Jewish leadership opposed the resettlement of Jews in Chortkiv until 1705. During that time, the town was also granted Magdeburg rights. However, Chortkiv would later decline in the second half of the 17th century during Ottoman Expansion of central Europe. The town was taken over by Ottoman Empire, whose rule lasted 27 years. It was part of the short-lived Turkish Podolia Eyalet, which lasted from 1672 to 1699. During this period, it was nahiya centre in Yazlofça sanjak as "Çortkuv" (Spelled as "Chortkoov" in Turkish). After First Partition of Poland Chortkiv came under Austro-Hungarian rule which lasted from 1772 to 1918, during the time of which it was the center of the Chortkiv Bezirk except brief Russian rule between 1809 and 1815 as part of Tarnopol Governorate. On June 8, 1919 the Ukrainian Galician Army broke for couple months through the Polish front at Chortkiv and began the Chortkiv offensive. Soon afterwards, the town was seized by the Poles. It was ceded to sovereign Poland in the Peace Treaty of Riga between Poland, Soviet Russia (acting also on behalf of Soviet Belarus) and Soviet Ukraine, and remained part of the Tarnopol Voivodeship of the Second Polish Republic until the Soviet invasion of Poland in September 1939.