Qazax District

Both of the exclaves and parts of mainland Qazax District (the villages of Baghanis Ayrum, Ashaghi Eskipara, Gyzylhajily, and Kheyrimli) were captured by Armenian forces during the First Nagorno-Karabakh war.

The region was conquered by a succession of neighboring powers or invaders, including Armenians, Sassanid Persians, the Byzantine Empire, the Arabs, the Seljuq Turks, the Georgians, the Mongols, the Timurids, the Qara Qoyunlu and Aq Qoyunlu Turkoman tribes, and finally Safavid Iran.

Though it was part of the Karabakh principality during the Safavid Empire, Sultan Shamsaddin of Gazakh was given the rank of Khan by the decree of Abbas the Great in 1605.

A contemporary military historian noted the following ethnographic detail: "Abbas Mirza's route lay through the country of the great tribe of the Casaks, which is extremely strong and thickly wooded."

"[3] When the South Caucasus came under British occupation, Sir John Oliver Wardrop, British Chief Commissioner in the South Caucasus, decided that assigning the Erivan Governorate and the Kars Oblast to Democratic Republic of Armenia (DRA) and the Elisabethpol and Baku Governorates to the Azerbaijan Democratic Republic (ADR) would solve the region's outstanding disputes.

Situation in western Gazakh following the First Nagorno-Karabakh war