The town's location on the route between Lwów (modern Lviv) and Trembowla (modern Terebovlya) proved beneficial to the city's growth and development. Among the first settlers to inhabitate the town were people of Lwów liberated by Sieniawski from Tatar captivity. It soon started to attract settlers from all over Poland, including a large number of Jews, Ruthenians and Armenians. In 1534 Mikołaj Sieniawski also started to construct a large fortress at a steep hill on a small island at the Złota Lipa river. The stronghold was finished in 1554 and became the main seat of the Sieniawski family and one of the best fortified places in the region. Simultaneously, a large fortified convent and a church of the Bernardines was constructed at the hill nearby. Both fortified places provided a safe refuge for the tradesmen, which added to the city's prominence in trade and commerce. In early 17th century one of Mikołaj Sieniawski's grandsons, also named Mikołaj, fortified the city itself. The fortress withstood all attacks by Tatars and Cossacks until the Chmielnicki's Uprising of 1648 when it was captured by the Cossacks. In 1655 during The Deluge, it was again captured by the forces of Sweden and the city was again plundered. However, it was rebuilt afterwards and withstood further Cossack attacks in 1667 and 1672.
In 1675 the town was again sacked and pillaged by the forces of the Ottoman Empire. However, Mikołaj Hieronim Sieniawski financed the reconstruction of the town. Among the buildings rebuilt were the Bernardine church and an Uniate church in the suburb of Polska Adamówka (paradoxically being primarily inhabited by Ruthenians and not Poles as the name suggests). Because of that relative safety the town grew and by the end of the 17th century there were nearly 8,000 inhabitants there. After the death of Adam Mikołaj Sieniawski, the last of his kin, the town was inherited by August Aleksander Czartoryski through Sieniawski's daughter Maria Zofia. Czartoryski, a notable magnate, in early 18th century created a large artificial lake in the town's proximity. Along the bank of that lake the suburbs of Siółko and Kastelówka were built. After the first Partition of Poland of 1772 the town was annexed by Austria, who attached it to the region of Galicia. After 1867 the town became part of the Austro-Hungarian Empire and continued to flourish as it was outside of the region of fortifications, in which construction of new houses was severely limited. A grammar school was founded there in 1805, and had many notable alumni. Among them were Włodzimierz Bednarski, Franz Kokovsky, Bohdan Lepkyi, Rudolf Moch, Kornel Ujejski, Ruslan Shashkevych, and the future Marshal of Poland Edward Rydz-Śmigły. The town was connected by rail to Tarnopol (modern Ternopil, Ukraine) in 1894 and as of 1900 it had a population of 10,610.
Although the city remained quite populous, with time it lost much of its importance as a trade centre and became populated primarily by Jews as a typical shtetl. Also the castle fell in neglect as the successors of Sieniawski family, the Czartoryski and Lubomirski families were owners of many more castles and had no interest in this one in particular. During the World War I the town was briefly occupied by Russia, but was soon recaptured by Austria-Hungary. The castle was partially pillaged by Austro-Hungarian soldiers who were stationed there during the war while some of the works of art were evacuated from the palaces of Puławy, Łańcut and Wilanów. At the end of the war the town was disputed by the short-lived West Ukrainian People's Republic, but in 1919 was awarded to the renascent Poland by the Conference of Ambassadors of the League of Nations, following a short Polish-Ukrainian War. During the Polish-Bolshevik War it was briefly occupied by the Red Army, but was soon recaptured by the Polish Army after the Battle of Warsaw. However, some of the most precious sculptures and paintings from the castle and local churches, evacuated to Kraków, were never returned and instead survived the war in the castle of Pieskowa Skała near Ojców.
After the Polish Defensive War of 1939 and the outbreak of World War II the town was briefly occupied by Nazi Germany, after which it was transferred to the Soviet Union. During the Soviet occupation many of the local inhabitants were sent to the Gulag camps; there was also a notable NKVD prison located in the town. In 1941, after the end of the Nazi-Soviet Alliance and the outbreak of the Russo-German War, the town was again occupied by Germany and attached to the so-called Distrikt Galizien of the General Government. Between 1942 and the end of the war there was heavy partisan activity in the area, mostly carried over by the local branches of the Armia Krajowa.
In 1944 the town was liberated in the course of the Operation Tempest, but was soon occupied by the Red Army. In 1945 it was annexed by the Soviet Union and attached to the Ukrainian SSR. Since 1991 it has been a part of Ukraine.