The first independent Khanate in Azerbaijan - Sheki Khanate
In the 40s of the 18th century, the political and economic situation in Azerbaijan deteriorated. As a result of continuous wars, the economy was destroyed, and the economic situation of the country deteriorated. Local judges were arbitrary and raised taxes illegally. This caused dissatisfaction of the population. Consolidating the political independence of the khanate, Haji Chalabi Khan began to implement the policy of uniting all of Azerbaijan into a single state. For this purpose, he first attacked Tabriz. This was no accident. Because Tabriz was historically the political center of Azerbaijan. The possession of Tabriz was one of the main factors for a unified government in Azerbaijan. But this march was unsuccessful. After that, Haji Chalabi Khan united with Shamakhi Khan and marched to Karabakh in 1748. The allies besieged the Bayat fortress, the first political center of the Karabakh Khanate. This event, which is called the "Bayat war" in history, was unsuccessful for the Sheki Khanate.
The absence of a centralized unified state in Azerbaijan created conditions for the implementation of the occupation policies of neighboring states. Georgian Tsar Irakli II wanted to occupy the western lands of Azerbaijan. For this purpose, he often made invasion marches. However, the Sheki Khanate was the main obstacle in his implementation of this policy. "Betrayal of Gizilgaya". Realizing that he could not fight the Shaki Khanate alone, Irakli II resorted to a cunning measure. He tried to create an alliance of other Azerbaijani khanates against Sheki Khan with the idea of "divide and conquer". For this purpose, he first made an alliance with Karabakh Khan Panahali Khan. After Panahali Khan, Ganja, Garadag, Irevan and Nakhchivan khanates also joined this union. In 1752, the allies gathered for a meeting near Ganja in a place called Kizilgaya. However, the Georgian tsar betrayed his allies and surrounded and captured the Azerbaijani khans who came to the negotiations.
Hearing this news, Haji Chalabi Khan attacked the Georgian tsar's army to free the Azerbaijani khans. In this battle, the cavalry led by the Khan himself inflicted a heavy defeat on the enemy. Azerbaijani khans were released. After this victory, Haji Chalabi Khan freed Gazakh and Borchali districts and returned them to Azerbaijan and included them in his khanate. But later, the Georgian tsar was able to occupy Gazakh and Borchali districts again. Haji Chalabi Khan, who continued the policy of unifying the lands of Azerbaijan, marched to Shirvan in 1755. However, as a result of the help of Guba Khan Huseynali Khan to Shamakhi Khan, Haji Chalabi Khan's campaign was unsuccessful. Quarrels between the Azerbaijani khanates, internecine wars, foreign intervention and economic weakness hindered attempts to unify the country.
During the reign of Haji Chalabi Khan, Sheki Khanate was the most powerful political institution in Azerbaijan. This khanate prevented the invasion of the northwestern Azerbaijani lands by the Georgian tsars. Haji Chalabi Khan is one of the first Azerbaijani khans who maintained diplomatic relations with the Ottoman state. Chalabi Khan built a mosque, a madrasa and other public buildings in Shaki. Regulated the tax system. After Haji Chalabi Khan, his son Agakishi Bey came to power. But he was soon assassinated. After Agakishi Bey's death, a period of power struggles began in the khanate. First, Huseyin Khan, the grandson of Haji Chalabi Khan, came to power. The local population and the Khan of Guba, Fatali Khan, helped him come to power. Therefore, for some time Huseyn Khan pursued a policy of alliance with Fatali Khan. In 1767, Huseyin Khan Guba Khan together with Fatali Khan divided the territory of Shamakhi Khanate between them. However, a year later, Fatali Khan defeated Huseyn Khan and merged the other part of Shamakhi Khanate under his rule into Guba Khanate. Hussain Khan's era was characterized by strife for power. After Husayn Khan, his son Muhammadhasan Khan came to power. During the time of Mohammad Hasan Khan, a special law was adopted. Taxes, feudal relations, rights and duties of social classes were regulated in this law. At the end of the 18th century, Salim Khan (1795-1806) came to power in the Sheki Khanate. As a result of power struggles and struggles with other khanates, the Sheki khanate weakened.