Ahmed khan sent an army contingent to Baku to set up Muhammadquli agha on the throne in 1791.
Since Baku army only consisted of 500 men or so Mirza Muhammad abdicated in favor of his uncle that year.
Confused Gudovich ordered counter-admiral Pyotr Shishkin to resolve the problem and act in Russia's interests.
Muhammadquli khan forced to make peace with Shaykhali in October and paid him 24.000 rubles as compensation.
[3] Characterized by Abbasgulu Bakikhanov as "generous but harsh" person, he died in 1792 in Baku[4] and was buried in Karbala.