":Ali, as I've wrote, none of those authors are aware of many important details, such as Kurekchay Treaty - an official and legal treaty which defined the entry of Karabakh into Russian empire. At the same time, the khan of Sheki too signed a similar treaty, for example. I know Michael Croissant, and his book is full of mistakes and errors, his book doesn't mean much in this regard. His mistakes are too gross  the Russo-Iran war started in 1806, whilst Karabakh became part of Russia in 1805 before such a war. Meanwhile, Tim Potier is a good legal expert, and it is surprizing to see him write that. But everyone is entitled to errors and his was due to lack of resources - he was limited as a scholar in variety of materials and legal status of Karabakh in 19th century was not his objective  the 20th century was. Anyways, I do not know the khans of Iran in the south and which treaties they concluded with British. If they did it in the Zand period, they probably had full legal right at the time, since Iran was more of a geographic entity, than political. Same with Azerbaijan (North) - it was geographic too. Whilst I do not remember the legal documents and letters of the time, the later Russian and British documents clearly identified Azerbaijanis of the North as ""aderbeijani tatars"" - I have evidence of that as far back as 1880 in British census estimates and in the 1897 official Russian Imperial Census. Same word is used by Russian ethnographer Velichko in his 1903 book. Azerbaijani author, Firudin bey Kocharly wrote a book in 1908 ""Literature of Azerbaijani Turks"". 

Anyways, Azerbaijanis simultaneously fought against both Iran and Russia at the time, and some sided with either one side or another. Unfortunately, you won't find much on that in libraries - but just one such translated book would allow scholars to reconsider mistaken assumptions. What is more important however, is that Karabakh khan (khan being a Turkic term derived from kagan), was that it concluded its own treaty, that it minted its own money (one of the typical examples of independence), and fought several wars with Iran, some handily winning, others, like 1797, ambgiously  but still Shah Muhammed Qajar gets killed. And I don't know who told you about Vagif and Ibrahim  by the later you probably mean Ibrahim khan, right? Well, Vagif, the poet and vizier, was executed in 1797, AFTER shah's death, and was executed by the temporary ruler, Mamed bey Jevanshir, who was nephew of Ibrahim khan. While details are murky and contradictory, the Qajars didn't have the primary rolse in this  indeed, once shah was killed, Iranian troops withdrew, it screwed up all the plans to re-conquering other parts of Azerbaijan and Georgia. Meanwhile, Ibrahim khan lived and ruled the khanate until tragic error - or so it is explained  in 1806. But anyway, the Kurekchay Treaty was signed by him. Thus, once more, Karabakh khanate, for one, was totally independent, and Iran had no legitimate or otherwise claims whatsoever to it. Meanwhile, few other khanates were nominally dependent - like Poland was to USSR, or Armenia to Russia (Russian speaker of Parliament, #3 person in the country, openly called it ""forepost of Russia"" whilst in Armenia).  

"