Founder of the Karabakh Khanate Panah Ali Khan constructed the Shahbulag Castle complex near Shahbulaghi (the Shah’s Spring), 6 miles (10 kilometers) away from the city of Aghdam. The construction of the complex was finished in 1751-1752, and served as his rest area. Mosques, houses, public baths, and a market were constructed within the Shahbulag