The 17th century occupants, the Sapieha family, fortified the castle such that it was the only castle in the region to survive the Cossack Khmelnitzky massacres and subsequent wars with Russia. The castle survived a siege in 1660, the only fortress in the Grand Duchy of Lithuania not to be captured by Russia during the Russo-Polish War (1654–67).