The city achieved its greatest power during the reign of Prince Vasylko Rostyslavych, the great-grandson of the Grand Duke of Kiev Yaroslav the Wise.
[1] Prince Vasylko Rostyslavych's fortress was a wooden, enclosed palisade, and only the castle church within it was built of stone.
In those days, the wooden walls of the castle were replaced by stone, but in 1241 Terebovlia was completely destroyed by the hordes of Batu Khan.
Within a few months, the Terebovlian Andrzej Tęczyński - a castellan of the then Polish capital of Krakow - rebuilt it at his own expense.
The necessity of repairing the castle was mentioned in the privilege of King Stephen Báthory from 30 November 1576 (a copy was preserved [2] ).
In course of Polish–Ottoman War (1672–1676) Terebovlia castle became an important border fortress after the partition of Podolia by Turkey in 1671.
In 1675 Mehmed IV sent a new 10,000-strong Turkish-Tatar army under command of Pasha Ibrahim Shyshman [4] to enter Ukraine and on 20 September the siege of Terebovlya began.
Despite considerable numerical advantage, Pasha Ibrahim Shyshman was unable to capture the castle and on 11 October retreated south in anticipation of the early start of winter season.