Qajar principality of Merv
The Qajar principality of Merv was an independent principality that existed in Central Asia from c.1747 to 1788. It was ruled by the 'Izz al-Dinlu clan of the Qajars of Merv, who had been governors of the oasis since Safavid times. It gained its independence after the death of Nader Shah in 1747 and had good relations with the ruler of Bukhara, Daniyal Biy. When his son, Shah Murad took over in 1785, he launched a campaign that killed the ruler of the principality, Bayram 'Ali Khan Qajar. In 1788 the entire oasis was conquered and annexed to Bukhara. The last ruler, Mohammad Husayn Khan, fled to Iran.
Background
In the 16th century, the region of Merv was disputed between the Khiva Khanate, Bukhara Khanate and the Safavid Empire. Although Isma'il I had conquered it with the Battle of Merv, it soon was lost and became a dependency of Khiva. Under 'Abdallah Khan, Bukhara gained control of Merv in 1593. However, a few years later, Shah 'Abbas the Great's campaigns against the Uzbeks resulted in a Safavid governor being appointed to Merv in 1600. In 1608, he was succeeded as governor by Mihrab Khan Qajar, the first of a long series of Qajar governors of Merv. A large portion of Merv's population consisted of tribes resettled by 'Abbas the Great.During the late 17th and early 18th centuries, Merv began to decline as an economic and political center. The Qajars of Merv began to assert their independence from the declining power of the Safavid state. From 1715, the Qajar chieftain Mohammad 'Ali Beg expelled three consecutive governors of Merv, assuming complete sovereignty after the fall of Isfahan in 1722. Malek Mahmoud Sistani also unsuccessfully tried to assert his authority over Merv. In 1723–24, coinciding with detrimental conditions in the oasis, Nader Shah Afshar began to intervene in the politics of Merv on behalf of the Qajar rulers. He tried to prop up Mohammad 'Ali Beg's successor, Fulad Beg, as governor; However, Fulad Beg was killed by the Tatars, who then began to ravage the oasis. Within a decade, Nader destroyed the Tatar and Turkmen power around Merv. Kalb 'Ali Khan Afshar, the governor of Merv from 1738 onwards, revived the irrigation system which had been devastated by raids, and discouraged Turkmen raiding activities to the point where they entered the oasis solely for commercial activities.
During the 1740 campaign against Bukhara, Nader ordered the chiefs of Merv to provide supplies to the army. However, despite all of these measures, many of his soldiers died during the march through the desert, encouraging Nader to launch a purge of the provincial government. Most of the local administrators were killed, and Nader Shah installed Shah Qoli Beg Qajar, son of Mohammad 'Ali Beg, as the local governor of Merv, reviving the hereditary Qajar rule over the city. During the last years of Nader Shah's rule, Shah Qoli Beg Qajar revolted against demands for high taxes, but he was arrested and blinded.