Safavid dynasty of Iran, expelled them. In this period, a Persian nobleman restored a large dam (the "Soltanbent") on the river Murghab, and the settlement which grew up in the irrigated area became known as , as referenced in some 19th-century texts. After Shah Ismail's death, the region became a dependency of Khiva, but in 1593 Merv was conquered by AbdUllah Khan II of Bukhara. The city was soon captured by Shah Abbas, and a Safavid governor (Biktash Khan Ustajlu) was appointed to the governorship in 1600. In 1608, Mihrab Khan Qajar became governor, beginning two centuries of Qajar governorship over Merv. From 1715, the Qajar elite began to assert Merv's independence from the Safavid government, but within a decade the oasis became insecure due to raids by Tatars and Turkmens. Nader Shah launched military campaigns that cowed the Turkmens and Tatars and restored Merv's irrigation system. After Nader Shah's death, the local Qajars in the region declared independence and formed the Qajar Principality of Merv. In 1785, the Manghit amir of Bukhara, Shah Murad, attacked the city and killed the ruler, Bayram 'Ali Khan Qajar. A few years later, in 1788 and 1789, Shah Murad razed the city to the ground, and broke down the dams, leaving the area a waste land. The entire population of the city and the surrounding oasis of about 100,000 were then deported in several stages to the Bukharan oasis and the Samarkand region in the Zarafshan Valley. Being the last remaining Persian-speaking Shias, the deportees resisted assimilation into the Sunni population of Bukhara and Samarkand, despite the common Persian language they spoke with most natives. These Marvis survive —Soviet censuses listed them as "Iranis/Iranians" through the 1980s. They live in Samarkand and Bukhara and the area in between on the Zarafshan river. They are listed as Persian speaking but counted separately from the local Tajiks because of their Shia religion and the maintaining their ancient Mervi identity. Nineteenth century Merv passed to the Khanate of Khiva in 1823. Sir Alexander Burnes traversed the country in 1832. About this time, the Persians forced the Tekke Turkmens, then living on the Tejen River, to migrate northward. Khiva contested the Tekkes' advance, but in about 1856, the latter became the sovereign power in the country, and remained so until the Russians occupied the oasis in 1884. By 1868, the Russians had taken most of Russian Central