Shaykh Ali Khan or Shikh Ali Khan (; 1778, Quba — 1822, Balakhani) was the last khan of Quba before its annexation to Russian Empire.
Early life
He was born in 1778 to Fatali Khan and his Armenian wife Saharnaz, sister of a certain Harutyun of Zeykhur. Although some authors suggested that she might be a Georgian. His father died in 1789, leaving his 12 year old son at the care of his brother Ahmad Khan who tasked him with recapturing Salyan from Rudbar magnates next year. However, he had to return to Quba upon learning his elder brother's death in 1791, appointing his 7-year old brother Hasan Khan as governor of Salyan.
Reign
Upon inheriting the throne, Shaykh Ali sought to restore his father's power in South Caucasus. He sent his envoy Mirza Hasan to Russian general Ivan Gudovich in 1793, renewing his allegiance to Russian Empire. But when Gudovich sent an officer to Derbent and asked khan to sign the terms of his subjection, the khan refused. It turned out that he was only afraid of the approach of Suleyman Khan Qajar, the general of Agha Muhammad Khan Qajar and refused to sign the terms thinking that the Iranian danger was over.
Khan marched on Baku Khanate in 1794, to restore his cousin Mirza Muhammad II to throne. However upon hearing the news from Shaki Khanate that Salim Khan – new khan of Shaki – massacred all children of former khan, including Shaykhali's nephew, marched on Shaki, leaving Mirza Muhammad near Balakhani with a thousand men. He marched on Mustafa Khan of Shirvan who was ally of Salim Khan same year and besieged him in Aghsu. Although he was supported by Dagestani rulers, siege coupled with rainy weather, attrition, lack of supplies and the army became incapacitated. Mustafa khan in return staged a successful sortie forcing Shaykh Ali to retreat.
Soon, the Gazikumukh khan Surkhay II attacked village of Zeykhur, maternal village of Shaykh Ali. However thanks to the intervention of utsmi Ali Bek and qadi of Tabasaran sides signed a truce in the village of Koysu.
Affairs of Derbent
Agha Muhammad Qajar's arrival in South Caucasus triggered with expedition of Valerian Zubov in 1796, who besieged Shaykh Ali's castle with more than 12,000 soldiers for 2 months. Shaykh Ali hoped for a Qajar or an Ottoman relief to come and thus prolonged the negotiations. He sent an envoy named Haji beg to Ottoman Empire in April, and an emissary named Qadir beg to Agha Muhammad Khan. However Zubov started bombarding the castle on 14 May. The town surrendered just after a week. Zubov arrested Shaykh Ali Khan, while appointing his pro-Russian half-sister Pari Jahan Khanum as head of the Derbent Khanate.
Shaykh Ali however managed to escape to near Gilgilçay, reached Kumukh asked for troops from Surkhay II to retake Quba. Shaykh Ali and 10,000 strong Gazikumukh armies were defeated by Russian detachment sent under general Sergei Bulgakov. As a result of disastrous battle near Alpan, 1600 Dagestanis died, including Surkhay's son Bayram, as well as councillor Molla Taghi.
Zubov, on the other hand, suspected khan's sister Pari Jahan of helping him and recalled another half-sibling of Shaykh Ali, Hasan Khan from Elisu to govern Quba and Derbent. Hasan was declared new Khan of Quba and Derbent on . However, just 3 days later Catherine II died and situation of Russian troops in Caucasus left under question. In March 1797, Hasan moved his residence to Derbent, afraid of Shaykh Ali. Pari Jahan, meanwhile, agreed to marriage proposal from Mehdi, Shamkhal of Tarki and wed another half-sister Chimnaz to Abdulla beg, son of Ghāzī Rustam of Tabasaran. Hasan soon had to abandon Derbent and flee to Kaitag Utsmiate.
After departure of Russian troops from Caucasus and assassination of Agha Muhammad Qajar on 17 June 1797, Shaykh Ali managed to reconsolidate his dominion over Quba and Derbent and sent his ambassador Manaf beg to Saint Petersburg to put forward claims to Baku Khanate again. New emperor Paul I recognized him as a subject of Russia and dominion over Baku, Mushkur, Salyan and Derbent, as well as sending some supplies to repair Derbent.