After Azerbaijan declared its independence from the Soviet Union in 1991, Stepanakert was renamed by the Azerbaijani government back to Khankendi. Fighting broke out over control of Nagorno-Karabakh, which, after three years of heavy fighting, resulted in Armenian control of the region and a connecting corridor to Armenia to the west. Prior to the conflict, Stepanakert was the largest city of the NKAO, with a population of 70,000 out of a total 189,000 (Armenians at the time comprised 75% of the region's total population). By early 1992, that figure had dropped to 50,000.