Original sentence: Baku Khanate was an independent khanate (principality), formally under Persian suzerainty  on the territory of modern day Azerbaijan to 1806.It was founded in 1747 by Dargah Quli Khan of Afshar tribe, whose Kizilbash ancestors were granted lands near Baku in 1592.The Khanate of Baku was one of khanates which arose after the collapse of Iranian empire of Nader Shah.The contacts between Baku Khanate and Iran consisted mainly of maritime commercial links
Edited sentence: Although, the khan could act within certain independence, he was vassal of the Iranian shah (King).Baku Khanate was Persian ruled  Khanate (principality) on the territory of modern day Azerbaijan from Safavid dynasty  to 1806.Baku was one of Khanate (principalities) which arose during the domination of Iran.During the period of Iranian domination, head of principality was a Khan.It was founded by Dargah Quli Khan of Afshar tribe, whose Kizilbash ancestors were granted lands near Baku in 1592