The town was first liberated in the First Serbian Uprising in 1804 by the hajduks company of Đorđe Obradović "Ćurčija". Vojvoda Maksim Krstić and count Krsto Ignjatović were leaders of the defense of Krupanj during the uprising. The first basic school in the town was opened in 1837, and the church of Holy Ascension was built in 1842. The Ottomans ultimately withdrew in 1862, and the nearby fortress called "Soko Grad" was torn down, to be turned into the monastery of St. Nicholas.