[5][6][7] 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.
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.
[26] 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 subjection.
[9][3] During this period Merv, like Samarqand and Bukhara, functioned as one of the great cities of Muslim scholarship; the celebrated historian Yaqut (1179–1229) studied in its libraries.
[31] 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.
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.
Arab historian Ibn al-Athir described the event basing his report on the narrative of Merv refugees: Genghis Khan sat on a golden throne and ordered the troops who had been seized should be brought before him.
They took the wealthy people and beat them and tortured them with all sorts of cruelties in the search for wealth ... Then they set fire to the city and burned the tomb of Sultan Sanjar and dug up his grave looking for money.
"[41] Almost the entire population of Merv, and refugees arriving from the other parts of the Khwarazmian Empire, were slaughtered, making it one of the bloodiest captures of a city in world history.
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 Baýramaly, as referenced in some 19th-century texts.
[45] 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.
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.
He later wrote: "In the midst of an absolute wilderness of crumbling brick and clay, the spectacle of walls, towers, ramparts and domes, stretching in bewildering confusion to the horizon, reminds us that we are in the centre of bygone greatness.
Gäwürgala (also known as Gyaur Gala), which surrounds Erkgala, comprises the Hellenistic and Sassanian metropolis and also served as an industrial suburb to the Abbasid/Seljuk city, Soltangala—by far the largest of the three.
[56] The foundation of Gäwürgala (Turkmen from the Persian "Gabr Qala", "Fortress of the Zoroastrians") occurred in the early Hellenistic era under the rule of the Seleucid king Antiochus I.
Gäwürgala is also important for the vast amount of numismatic evidence it has revealed; an unbroken series of Sassanian coins has been found there, hinting the extraordinary political stability of this period.
Textual sources establish it was Abu Muslim, the leader of the Abbasid rebellion, who symbolised the beginning of the new Caliphate by commissioning monumental structures to the west of the Gäwürgala walls, in what then became Soltangala.
[58] The area was quickly walled and became the core of medieval Merv; the many Abbasid-era köshks (fortified building) discovered in and outside Soltangala attest to the centuries of prosperity which followed.
A kind of semi-fortified two-story palace, whose corrugated walls give it a unique and striking appearance, köshks were the residences of Merv's elite.
Merv's largest and best-preserved Abbasid köşk is the Greater Gyzgala (Turkmen, "maiden's fortress"), located just outside Soltangala's western wall; this structure consisted of 17 rooms surrounding a central courtyard.
The nearby Lesser Gyzgala had extraordinarily thick walls with deep corrugations, as well as multiple interior stairways leading to second storey living quarters.
The surviving mud brick walls lead to the conclusion that this palace, though relatively small, was composed of tall, single-storey rooms surrounding a central court along with four axial iwans at the entrance to each side.
These fortifications, which largely remain, began as eight-to-nine-metre-high (26 to 30 ft) mud brick structures, inside of which were chambers for defenders to shoot arrows from.
[64] Turquoise and black bowls were discovered in the Shahryar Ark palace, as well as a deposit of Mongol-style pottery, perhaps related to the city's unsuccessful re-foundation under the Il-khans.
Also from this era, is a ceramic mask used for decorating walls found among the ruins of what is believed—not without controversy—to be a Mongol-built Buddhist temple in the southern suburbs of Sultan Gala.
Shaim Kala was a self-contained walled city intended to relieve over-crowding, and to deal with the religious and political discontent of the newly arrived peoples.
Thus, they make Merv a sort of watch tower over the entrance into Afghanistan on the north-west and at the same time create a stepping-stone or étape between north-east Persia and the states of Bukhara and Samarqand.
[72] Merv is advantageously situated in the inland delta of the Murghab River, which flows from its source in the Hindu Kush northwards through the Garagum desert.
The Murghab delta region, known to the Greeks as Margiana, gives Merv two distinct advantages: first, it provides an easy southeast–northwest route from the Afghan highlands towards the lowlands of Karakum, the Amu Darya valley and Khwarezm.
Second, the Murgab delta, being a large well-watered zone in the midst of the dry Karakum, serves as a natural stopping-point for the routes from northwest Iran towards Transoxiana—the Silk Roads.