During the Russo-Persian War of 1826–1828, the citadel at Shusha held out for several months and never fell. After this Shusha ceased to be a capital of a khanate, which was dissolved in 1822, and instead became an administrative capital of first the Karabakh province (1822–1840), following Persia's ceding to Russia, and then of the Shusha district ("uyezd") of the Elisabethpol Governorate (1840–1923). Shusha grew and developed, with successive waves of migrants moving to the city, particularly Armenians, who formed a demographic majority in the surrounding highlands.