Okopy () is a selo in western Ukraine. It is located in Chortkiv Raion (district) of Ternopil Oblast (province), and had its origins as a Polish fortress at the meeting of the Zbruch and Dniester rivers. It belongs to Melnytsia-Podilska settlement hromada, one of the hromadas of Ukraine. The current estimated population is around 557 (as of 2005). Name The settlement was previously referred to as Okopy Svyatoyi Triytsi (Ukrainian: Окопи Святої Трійці; ; Russian: Окопы Святой Троицы), translated as the Ramparts of the Holy Trinity. History The stronghold and the neighbouring town were built in 1692, by Stanisław Jan Jabłonowski, Grand Hetman of the Crown. The site was chosen by King Jan III Sobieski of Poland, as a measure to stop a possible attack from the nearby Turkish-seized fortresses of Kamieniec Podolski, twenty kilometers away, and Chocim, eight kilometers away. The fortress was expanded by Tylman of Gameren, one of the most notable Polish architects of the time. The site is a natural fortress: a small strip of high rocks linking the Zbruch and Dnister rivers. Tylman of Gameren decided to build a double line of fortifications (two rampart lines of bastion system) with two gates leading east- (Kamieniec Gate) and westwards (Lwów Gate). Other directions were defended by towered walls and natural escarpments over the river banks, with walls stretching along both sides of isthmus on the edge of steep slope to the river. The construction was started under the command of the General of Horse Artillery, Marcin Katski, and the works were finished in the same year. The nearby village was also fortified. In 1693 Jan III Sobieski built a votive church in the compound. Israel ben Eliezer, a Jewish mystical rabbi and the founder of the Hasidic Jewish movement, was born in Okopy in 1698 (although he later lived in nearby Tluste). The stronghold was abandoned in 1699, when the rest of Podolia was returned to Poland, and the fortress lost its importance as a counterbalance to Kamieniec Podolski. In 1769, the Bar Confederacy, defended the stronghold against the besieging forces of Russia. The defence was commanded by the future Hero of the American Revolutionary War, Kazimierz Pułaski. After the Partitions of Poland in 1772, the village and the ruins of the stronghold became the easternmost point of Austrian Galicia. The nearby town was abandoned, and the inhabitants of the village moved inside the fortress walls.