Hosein Qoli Khan Badkubeh

He was ultimately forced to flee to Iran due to a rebellion by the inhabitants of Baku, who did not want to endure another Russian siege.

Being not far from Baku, Mirza Muhammad blocked all trade and support routes to city, causing Hosein Qoli Khan to send Manaf beg to Gudovich again complaining of Shaykhali khan while he himself suddenly ambushing Mirza Muhammad and capturing him with his family.

Indeed, through Mostafa khan's help, cousins made peace and Mirza Muhammad went back to Quba, while retaining his income from Baku oil fields.

The khan can not enjoy diplomatic relations with neighboring states who are not subjects of Russia, without preliminary agreement with the main commander of the Caucasus front.

General Vasili Rakhmanov was sent to occupy Baku with 3 battalions of infantry, 2 cavalry squadrons and 3 artillery guns.

Now being left at mercy of Agha Muhammad, Hosein Qoli Khan was captured and imprisoned in Shusha on 11 May.

The khan declined, but pleaded guilty when a Russian ship "Kizlyar" fired a cannon on city on 6 February.

On 24 April 1803, Tsitsianov asked Vorontsov to dispatch two regiments (from Taman and the Crimea) at his disposal for the garrison in Baku and the occupation of other points lying about.

However, in 1804, at the insistence of the Baku and Shemakhan nobility, the agreement with Russia was cancelled by Hosein Qoli Khan.

In 1805, a Russian squadron entered the Baku bay under the command of General Irinarch Zavalishin and proceeded to siege the city.

Khan sent an envoy to Zavalishin to negotiate, however, he responded that he had been sent by the emperor to occupy Baku and demanded the immediate surrender of the city.

At the beginning of February 1806, Tsitsianov, marching with a large army, joined forces with General Zavalishin 2 versts from Baku and began negotiations with khan about the surrender of the fortress to the Russians.

On 8 February, khan, accompanied by his retinue, left the fortress to present city keys to Prince Tsitsianov.

Hosein Qoli Khan appeared again in 1826, this time with Qajar army to recapture Baku, but failed to do so.