[1] Although according to historian Marziya Isgandarova, this could be due to the fact that khan was suspicious of him and once told him "Would they allow an outsider to do that in Russia?"
[3] However, in 1774, Muhammed restored Aghasi Khan to Shirvan throne and challenged Quba khanate forces.
This treacherous act enraged Caucasian rulers who allied their forces against Fatali Khan – new energetic Avar nutsal Umma V and Kaitag utsmi Amir Hamza rallied different Dagestani rulers to invade Quba with reinforcements from Karabakh khanate (Ibrahim Khalil khan was a son-in-law to Umma V).
Battle of Gavdushan plains near Khudat in 1774 was a heavy blow to Fatali Khan's ambitions.
After his release, he appointed his 11-year-old son Mirza Muhammad to be in charge of Baku during his pilgrimage to Mecca.