Merv ( ; ), also called the Merve Oasis, was a major Iranian city in Central Asia, located on the historical Silk Road, near today's Mary, Turkmenistan. Human settlements on the site of Merv existed from the 3rd millennium BC until the 18th century AD. It changed hands repeatedly throughout history. Under the Achaemenid Empire, it was the center of the satrapy of Margiana. It was subsequently ruled by Hellenistic Kings, Parthians, Sasanians, Arabs, Ghaznavids, Seljuqs, Khwarazmians and Timurids, among others.
Merv served as the capital of several polities throughout its history. In the beginning of the 9th century, Merv was the seat of the caliph al-Ma'mun and the capital of the entire Islamic caliphate. It served later as the seat of the Tahirid governors of Khorasan. In the 11th–12th centuries, Merv was the capital of the Great Seljuk Empire and remained so until its fall. Around this time, Merv turned into a chief centre of Islamic science and culture, attracting as well as producing renowned poets, musicians, physicians, mathematicians and astronomers. The great Persian polymath Omar Khayyam, among others, spent a number of years working at the observatory in Merv. As Persian geographer and traveller al-Istakhri wrote of Merv: "Of all the countries of Iran, these people were noted for their talents and education." Arab geographer Yaqut al-Hamawi counted as many as 10 giant libraries in Merv, including one within a major mosque that contained 12,000 volumes.
Merv was also a popular pilgrimage destination and several religions considered it holy. In Zoroastrianism, Merv or Mouru was one of 16 perfect lands created by god Ahura Mazda. Between the 5th and 11th centuries, Merv served as the seat of an East Syrian metropolitan province. A descendant of the Islamic prophet Muhammad, 8th Imam of Twelver Shia Islam, Ali ar-Ridha, moved to Merv from Baghdad and resided there for several years. Al-Muqanna, the "Veiled Prophet", who gained many followers by claiming to be an incarnation of God, was born and started his movement in Merv.
During the 12th and 13th centuries, Merv may have been the world's largest city with a population of up to 500,000. During this period, Merv was known as "Marw al-Shāhijān" (Merv the Great), and frequently referred to as the "capital of the eastern Islamic world". According to geographer Yaqut al-Hamawi, the city and its structures were visible from a day's journey away. In 1221, the city opened its gates to an invading Mongol horde, resulting in massive destruction. Historical accounts contend that the entire population, including refugees were killed; Tolui Khan is reported to have slaughtered 700,000 people. Though partly rebuilt after the Mongol destruction, the city never regained its former prosperity. Between 1788 and 1789, the city was razed for the last time, by Shah Murad of the Emirate of Bukhara, and its population deported. By the 1800s, under pressure from the Russians, the area surrounding Merv was completely deserted.
History
thumb|right|300px|alt=Photograph of the remnants of Merv today including a citadel wall and a domed building|Ancient city of Merv, present day
Merv has prehistoric roots: archaeological surveys have revealed many traces of village life as far back as the 3rd millennium BC and have associated the area culturally with the Bactria-Margiana Archaeological Complex. The geography of the Zend-Avesta (commentaries on the Avesta) mentions Merv (under the name of Mouru) along with Balkh. In Zoroastrianism, the god Ahura Mazda created Mouru as one of sixteen perfect lands.
Under the Achaemenid Empire (c. 550–330 BC), the historical record mentions Merv as a place of some importance: under the name of Margu, it occurs as part of one satrapy in the Behistun inscriptions (c. 515 BC) of the Persian monarch Darius the Great. The first city of Merv was founded in the 6th century BC as part of the Achaemenid expansion into the region of Cyrus the Great (559–530 BC), but later strata deeply cover the Achaemenid levels at the site.
Hellenistic era
thumb|right|upright=0.7|alt=See caption |Coin of the [[Sasanian Empire|Sassanian king, Shapur III, minted in Merv]]
Alexander the Great's visit to Merv is merely legendary, but the city was named Alexandria () after him for a time. After his death in 323 BC, it became the capital of the Province of Margiana of the Seleucid, Greco-Bactrian (256–125 BC), Parthian, and Sassanid states.
The Seleucid ruler Antiochus Soter (reigned 281–261 BC) renamed it to Antiochia Margiana. He rebuilt and expanded the city at the site presently known as Gyaur Gala fortress. Isidore of Charax wrote Antiochia was called the "unwatered" ().
Parthian era
After the fall of the Seleucid dynasty (63 BC), Bactria, Parthia, and the Kushans took control in succession. In 53 BC, some 10,000 Roman prisoners of war from the Battle of Carrhae appear to have been deported to Merv.
Merv was a major city of Buddhist learning, with Buddhist monastery temples present for many centuries until its Islamisation. At the site of Gyaur Kala and , Buddhism was followed and practised often at the local Buddhist stupas.
Sasanian era
thumb|upright=0.7|Ambassador of Merv ( Moguo) to the [[Tang dynasty. Wanghuitu (), circa 650 CE.]]
After the Sasanid Ardashir I (220–240 AD) took Merv, the study of numismatics gives a clearer picture of the city’s history. A series of coins originally minted at Merv document almost four centuries of direct Sassanian rule without interruption. During this period, Merv was home to practitioners of various religions beside the official Sassanid Zoroastrianism, including Buddhists, Manichaeans, and Christians of the Church of the East. Between the 5th and 11th centuries, Merv served as the seat of an East Syrian metropolitan province. The first bishop was Barshabba (c.360/424). The Hephthalite occupation from the end of the 5th century to 565 AD briefly interrupted Sassanid rule.
Arab conquest and influence
<!-- (this place was a little colder because it was in the mountains) -->
Sassanian rule ended when the last Sassanian ruler, Yazdegerd III (632–651) was killed near the city and the Sassanian military governor surrendered to the approaching Arab army. Representatives of the Rashidun caliph, Umar, occupied the city, which became the capital of the Umayyad province of Khorasan. In 671, Ziyad ibn Abi Sufyan sent 50,000 Arab troops to Merv as a garrison. This colony retained its native Kufan sympathies and became the nucleus of Khurasan. Using the city as their base, the Arabs, led by Qutayba ibn Muslim from 705 to 715, brought large parts of Central Asia, including Balkh, Bukhara, and Fergana under subjugation. Merv, and Khorasan in general, became one of the first parts of the Persian-speaking world to become majority-Muslim. Arab immigration to the area was substantial. A Chinese man captured at Talas, Du Huan, was brought to Baghdad and toured the caliphate. He observed that in Merv, Khurasan, Arabs and Persians lived in mixed concentrations.
Merv gained renewed importance in February 748 when the Iranian general Abu Muslim (d. 755) declared a new Abbasid dynasty at Merv. He expanded the city, and, in the name of the Abbasid line, used the city as a base of rebellion against the Umayyad caliphate. After the Abbasids established themselves in Baghdad, Abu Muslim continued to rule Merv as a semi-independent prince until his eventual assassination. Indeed, Merv operated as the centre of Abbasid partisanship for the duration of the Abbasid Revolution of 746–750, and became a consistent source of political support for the Abbasid rulers in Baghdad later on; the governorship of Khurasan at Merv was one of the most important political figures of the Caliphate. The influential Barmakid family, based in Merv, played an important part in transferring Greek knowledge (established in Merv since the days of the Seleucids and Greco-Bactrians) into the Arab world.
thumb|250px|right|alt=Photograph of two domed, stone mausoleums |Mausoleums of Two [[Companions of the Prophet|Sahabi brothers, al-Aslamī and al-Ghifari, ancient Merv]]
Throughout the Abbasid era, Merv remained the capital and most important city of Khurasan. During this time, the Arab historian Al-Muqaddasi (c. 945/946–991) called Merv "delightful, fine, elegant, brilliant, extensive, and pleasant". Merv's architecture inspired the Abbasid re-planning of Baghdad. A 10th-century Arab historian, Ibn Hawqal, wrote of Merv: "and in no other city are to be seen such palaces and groves, and gardens and streams".
In the period from 813 to 818, the temporary residency of the caliph, al-Ma'mun effectively made Merv the capital of the Muslim world and highlighted Merv's importance to the Abbasids. A descendant of the Islamic prophet Muhammad, 8th Imam of Twelver Shia Islam, Ali ar-Ridha moved to Merv and lived there for several years. Merv also became the centre of a major 8th-century Neo-Mazdakite movement led by al-Muqanna, the "Veiled Prophet", who gained many followers by claiming to be an incarnation of God and heir to Abu Muslim; the Khurramiyya inspired by him, persisted in Merv until the 12th century. Great Persian polymath Omar Khayyam, among others, spent several years working at the observatory in Merv. As Persian geographer and traveller al-Istakhri wrote of Merv: "Of all the countries of Iran, these people were noted for their talents and education." Yaqut al-Hamawi counted as many as 10 giant libraries in Merv, including one within a major mosque that contained 12,000 volumes.
Turkmens in Merv
thumb|The Governor of Merv, wearing the Turkic [[sharbūsh hat, in Maqamat al-Hariri (1200–1210).]]
In 1037, the Seljuq Turkmens, a clan of Oghuz Turks moving from the steppes east of the Aral Sea, peacefully took over Merv under the leadership of Tughril—the Ghaznavid sultan Mas'ud I was extremely unpopular in the city. Tughril's brother Chaghri stayed in Merv as the Seljuq domains grew to include the rest of Khurasan and Iran, and it subsequently became a favourite city of the Seljuq sultans. Chaghri, his son Alp Arslan (sultan from 1063 to 1072) and great-grandson Ahmad Sanjar (sultan from 1118 to 1157) were buried at Merv, the latter at the Tomb of Ahmad Sanjar.
thumb|left|alt=See caption |Mausoleum of the Seljuq sultan [[Ahmad Sanjar]]
Nearing the end of the 11th century, Merv became the eastern capital of the split Seljuq state. However, starting from 1118, it served as the capital of the whole empire. During this period, Merv expanded to its greatest size—Arab and Persian geographers termed it "the mother of the world", the "rendezvous of great and small", the "chief city of Khurasan" and the "capital of the eastern Islamic world". Written sources also attest to a large library and madrasa founded by Nizam al-Mulk, vizier of the Seljuq empire, as well as many other major cultural institutions. Perhaps most importantly, Merv had a market described as "the best of the major cities of Iran and Khurasan".
Sanjar's rule, marked by conflict with the Kara-Khitai and Khwarazmians, ended in 1153 when Turkmen nomads from beyond the Amu Darya pillaged the city. Subsequently, Merv changed hands from the Turkmen nomads to the Ghurids in 1192, and to the Khwarizmians in 1204. According to Tertius Chandler, by 1150 Merv was the world's largest city, with a population of 200,000. By 1210, it may have had as many as 500,000 residents, preceding such medieval metropolises as Constantinople and Baghdad.
Mongols in Merv
thumb|alt=Photograph of the interior of a mausoleum showing a window and decorated tile on the walls |Inside the Mausoleum of Ahmad Sanjar
In 1221, Merv opened its gates to Tolui, son of Genghis Khan, chief of the Mongols. Most of the inhabitants are said to have been butchered. Arab historian Ibn al-Athir described the event basing his report on the narrative of Merv refugees:
