Following the formation of the Nagorno-Karabakh Autonomous Oblast a raion was formed which was centered on Stepanakert. In 1978, Askeran became its center, and the raion was renamed to Askeran. A total of 52 settlements were registered in 1979.
As the Karabakh conflict started, the Azerbaijani government began to implement a plan to create a new district center. From 1988 to 1990 the population of Khojaly village was increased from 2135 to 6000 residents. These mainly consisted of immigrants from Central Asia (more than 2000 Meskhetian Turks) and Armenia (about 2000). In April 1990, Khojaly received city status, becoming a regional center.