Merv (, , مرو; , Marv), also known as the Merve Oasis, formerly known as Alexandria (), Antiochia in Margiana () and Marw al-Shāhijān, was a major Iranian city in Central Asia, 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 centre of the satrapy of Margiana. It was subsequently ruled by the Ancient Macedonians, Parthians, Sasanians, Arabs, Ghaznavids, Seljuqs, Khwarazmians and Timurids, among others. Merv was the capital city 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 rulers of Khorasan. In the 11th–12th centuries, Merv was the capital of the Great Seljuk Empire and remained so until the latter's ultimate 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. 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 place for pilgrimage, and several religions considered it holy. In Zoroastrianism, Merv (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. The 8th Imam of Twelver Shia Islam Ali ar-Ridha (Imam Reza), 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–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