 The castle and the fortress withstood a siege by Cossack troops that lasted several weeks during the Khmelnytsky Uprising in 1648.During the Battle of Berestechko (1651) the fortress was the Polish military base.Here the captive Cossacks were detained.