struggle in Podolia. The city was frequently raided by Crimean Tatars, Turks and their erstwhile allies, the Zaporozhian Cossacks. The most destructive attacks happened in 1498, 1508, 1515 and 1516, resulting in a temporary decline of the town. In 1674, as preparations were undertaken for another war with the Turks who were then at war with Muscovy, the Diet decided to further strengthen Terebovlia and send garrisons there. The following year, the Janissary once again embarked on raids against towns and villages, and on 20 September 1675 destroyed the town, but the castle was held by a small group of defenders (80 soldiers and 200 townsmen) until King Jan III Sobieski arrived to relieve them. This episode is known as the Battle of Trembowla. The castle was destroyed during the final Turkish invasion of 1688. Modern history After the first partition of Poland in 1772, Trembowla became part of the Habsburg Empire's Galicia until 1918. From November 18, 1918, until June 9, 1919, the town was under control of the West Ukrainian People's Republic. Following the Polish–Ukrainian War, Trembowla reverted to Polish rule, and served as seat of a county in Tarnopol Voivodeship. In the interbellum period, the town was home to the 9th Regiment of Lesser Poland Uhlans. The Soviet Union took the city along with interwar eastern Poland in September 1939. The Soviets remained in power until the German invasion which began on 22 June 1941. Terebovlia was under German occupation from 5 July 1941 until 22 March 1944. It was administered as a part of the District of Galicia of the General Government of Nazi Germany. After troops of the 1st Ukrainian Front of the Red Army retook the town, it again became part of Soviet Ukraine between 1944–1991. In the first month of the German occupation, Ukrainian police arrested, tortured, and shot forty Jews. In 1942 and 1943, Germans, assisted by Ukrainian police, rounded up thousands of Jews. They murdered thousands nearby, in mass executions. After the liberation, only fifty or sixty people from the entire Jewish community had survived. During World War II, Trembowla and the surrounding areas also witnessed mass murders of ethnic Poles. After investigation of crimes done by Ukrainian nationalists and local Ukrainian peasantry, the Institute of National Remembrance of Poland confirmed the death at least 1002 persons in the territory of Tarnopol and Trembowla powiats (counties) As a result, and following