This article concerns the city of Ray, Iran (near Shahr-e-Rey) as a military objective, not the large territory of which it was once capital ("Ragau" in the Apocryphal Book of Judith). Ray, in an area of fertile lowland between the Zagros Mountains, the Elburz Mountains, and the great Dasht-e Kavir desert, commanded vital routes across and around the mountains, and was a key to power over the whole of Persia (Iran). The vast majority of ancient Persian literature has been lost, so little is known about the history of Ray before the arrival of Islam in the 7th century CE (although it is worth noting here that it was one of the great centres of the Zoroastrian religion).
Seleucids and Sassanids Alexander the Great passed through Ray (then called Rhagae) in pursuit of Darayavahush (Darius) III, last of the Achaemenid dynasty of Persia, resting his exhausted troops there for five days when he heard that his quarry had already reached the Caspian Gates passArrian Anabasis, book 3 section 20 (the much later historical epic, Shah-nameh, suggests that the garrison at Ray elected to join Alexander, and aided his conquest of Persia).Ehsan Yarshater (ed.) (1983) "Cambridge History of Iran. Volume 3(1)" Cambridge University Press (1983) , p110 After the great conqueror's untimely death, Seleucus, a successful officer in his army, initially settled in Babylon as his share of the empire, embarked on a nine-year campaign of conquest in 311 BCE, ultimately acquiring most of Persia. He followed Alexander's policy of establishing Greek cities at key strategic points, and among these was Europos, a replacement for the old Rhagae (much needed because there was an earthquake around 300 BCE).
Around 250 BCE, during the reign of the third Seleucid emperor, Arsak (Arsaces) killed the viceroy of Parthia and temporarily set up headquarters at Ray (Rhages), founding the Arsacid dynasty. He was unable to hold the city, but his family remained in control of the territory further east. A later Arsacid ruler of Parthia, Phraates I subdued the Mardi people of the Elburz Mountains, nominally subjects of the Seleucids, shortly after his accession in 181 BCE. According to Strabo's Geography, he settled them at Charax, a fort between Ray (Rhagae) and the Caspian Gates pass, the main communication route with the east. Phraates' successor Mithridates I then expanded Parthia, his conquests including Ray. The town seems to have suffered, and he had it "refounded" around 148 BCE with the name Arsacia.
Little is known about events around Ray over the next several hundred years (except that in 459 CE Peroz, son of Sassanid emperor Yazdegerd II, with allies from the Khorasan area, fought at Ray against his brother- who had succeeded their father as emperor Hormizd III- and thus became emperor Peroz I. Over a century later, the usurper Bahram Chobin was based in the city, though the military action in his brief period as ruler (590–591 CE) seems to have taken place elsewhere- the same may be said for his effective successor Vistahm, who minted coins in the city.Yarshater (1983) p160 Thus it would be wrong to assume that the following catalogue of events represents an abrupt change in the military history of Ray; the Islamic sources are simply very rich (which is also why Hijri dates are given alongside the CE dates from here on).
Muslim conquest, 7th century CE
In 19 H (640 CE) the forces of the second Islamic Caliph, 'Umar overran the key cities of Mesopotamia, forcing the Sassanid emperor, Yazdegird III, to withdraw across the Zagros Mountains to the Iranian heartland. He set up a new headquarters at Ray, called for aid from his nobles, and counter-attacked, but without much success. About 21 H (642 CE) the Caliph's forces began a new phase of their attacks by seizing a key pass over the mountains in the battle of Nihawand (now Nahavand). A Muslim army, led by Nu'aim ibn Muqarrin, descended (about 22 H/ 643 CE) from the uplands to the central plain of Iran. Yazdegird had moved on, leaving Ray in the hands of local governor Siyavakhsh, son of Mihran Bahram-i Chubin, son of Bahram Chobin. Allying himself with his neighbours further east (in Damavand, Tabaristan etc.) on the grounds that if Ray fell, they would be next, Siyavakhsh put up a strong defence, but after about a week he was, according to al-Tabari, betrayed by one of the city's aristocrats, Farrukhzad (perhaps due to political rivalry,al-Tabari (trans. G. Rex Smith) History, vol. 14: The Conquest of Iran, New York, SUNY Press (1994) , p24) perhaps because he had led a force from Ray to help battle the invaders at Waj Rudh, on the road from Hamadan, and had seen at first-hand the consequences of resisting the Muslimsal-Tabari (vol. 14), p21). While the armies engaged in a night battle at the foot of the mountain just outside Ray, he led some of Nu'aim's cavalry by a little-known route into the city (an alternative version has the Muslims discovering the way into the city for themselvesCompanions of the Prophet: Expansion of Islam witness-pioneer.org), from whence they emerged to attack the defenders' rear, causing great slaughter. To set an example, Nu'aim ordered the destruction of the Old Town ("al-Atiqah", perhaps the aristocratic quarter of Ray; it was rebuilt by Farrukhzad, whom he appointed as governor).al-Tabari (vol. 14), p20 Damavand and other territories to the east swiftly capitulated.
There were rebellions both in Hamadan and Ray shortly after the death of caliph 'Umar in 24 H (644–5 CE). The new Caliph, 'Uthman, placed Sa`d ibn Abi Waqqas (original leader of the Muslim campaign in Mesopotamia) in charge of Iraq, which then included the area known as Iraq Adjami (Iranian Iraq), stretching across the Zagros Mountains to Ray and beyond- also sometimes referred to as the Jibal. Sa'd sent 'Ala ibn Wahabin to make an example of Hamadan; the people of Ray, still dominated by feuding, self-interested aristocrats, soon abandoned their behaviour and started paying their taxes in 25 H (646 CE). Still the spirit of rebellion and dissension remained in Ray, so later in the Caliphate of 'Uthman, when Iraq was governed by Abu Musa al-Ashari- probably about 34 H (655 CE)- Qarazah ibn Ka'b Ansari had to be sent to impose peace.Frye (1975) p22
Dynasties and ideologies, 8th century CE In the declining years of the Umayyad dynasty, the Caliphate came close to collapse. In 122 H (740 CE) the Shi'ite Muslim Zayd ibn 'Ali had attempted unsuccessfully to take over as Caliph, and in 127 H (744 CE) the Shi'ites backed another claimant, Abdallah ibn Mu'awiyah. Failing to gain a victory in Mesopotamia, he crossed the Zagros Mountains, and by the end of 128 H (745 CE) most of western Iran, including Ray, had submitted to him. He was defeated a few months later, but the spirit of unrest remained.Enc. Iranica, article: Abdallah b. Mo'avea A year or two later, a revolt of Iranian Jews took place, led by Abu ‘Isa Isaac ibn Jacob al-Isfahani, (known as Abu Isa, or Obadiah) who claimed to be a messiah and proposed to lead his people back to Judea. He and his followers travelled from town to town gathering increasing support while fending off Muslim troops. However, when he brought his force to Ray, apparently about 131 H (748 CE), he met an army led by al-Mansur, who would later become the second 'Abbasid caliph, and was defeated with considerable bloodshed. He is believed to have been killed in the battle- but some of his followers thought otherwise, saying that he escaped and hid in a nearby mountain cave, and the Isawiya sect lasted at least two centuries more.Enc. Iranica, article: Abu 'Esa Esfahane
In the campaign which finally achieved the ascendancy of the 'Abbasid dynasty over the Umayyads, history vaguely repeated itself. Like the Sassanid emperor Yazdgird III, the leader of Arab forces in Iran, Nasr ibn Sayyar, went to Ray in the belief that there he would be able to obtain troops to challenge the 'Abbasids, who were pursuing him across the country. Meeting little success, he moved on to Saveh just before the pursuers reached Ray- but during his short stay in the city he had become ill, and he died in the autumn of 131 H (748 CE) soon after reaching Saveh.Frye (1975) p. 55
In the years immediately after the 'Abbasid dynasty took over the caliphate, there was more unrest. In 137 H (754–5 CE) a Zoroastrian supporter named Sunbadh, one of the first Khurramis (supporters of the late Abu Muslim, who had brought the 'Abbasids to power, only to be killed by the second 'Abbasid Caliph) took his tens of thousands of followers to Ray. There he opened the storehouses Abu Muslim had left when he went on the journey that ended with his assassination, and claimed the treasure within, before setting off towards Hamadan with thousands more supporters.al-Tabari (trans. Jane D. McAuliffe) History, vol. 28: 'Abbasid Authority Affirmed, New York, SUNY Press (1995) , p. 44 The Khurrami cause did not die with the bloody defeat of Sunbadh's army a few weeks later, and in 162 H (778–9 CE) more supporters of Abu Muslim allied at Djurdjan (Gorgan) with a sect known as the Muhammira, or "wearers of red", under the nominal leadership of one of Abu Muslim's sons or grandsons, Abu'l Gharra (but organised by 'Abd al-Qahhar). They marched to Ray, but there they met, and were crushed by, an army sent by Caliph al-Mahdi, led by 'Umar ibn 'Ala, governor of Tabaristan.Frye (1975) p. 505
Between those two Khurrami insurrections, in 141 H (758–9 CE) there was another illustration of the strategic importance of Ray, when the governor of Khorasan rebelled against the Caliph al-Mansur, who sent his son Muhammad (later Caliph al-Mahdi) to restore control, using Ray as a base. In the event, the governor was defeated by some of his own subjects,Hugh Kennedy The Armies of the Caliphs, London, Routledge (2001) , p. 101 but Muhammad ruled the eastern territories from Ray until 152 H (768–9 CE), and redeveloped the city under the name of Muhammadiya, with improved defences and military facilities (creating a new suburb, Mahdi-abadah, to resettle those whose homes were demolished in the process).M.T. Houtsma et al. (Enc. Islam) First Encyclopaedia of Islam, article: Raiy, Leiden, Brill (1913–36, reprinted 1993) His son, the great Harun al-Rashid, born and raised in Ray, made similar use of the fortified town, for example in 189 H (805 CE) when he heard that another rebellion was brewing in Khorasan.al-Tabari (trans. C.E. Bosworth) History, vol. 30, The 'Abbasid Caliphate in Equilibrium, New York, SUNY Press (1989) , p. 253 While in Ray, he took the opportunity to torture the local governor, Ishaq ibn al-Abbas al-Farsi to try to make him reveal the whereabouts of his niece's husband, the troublesome Isma'ili Imam, Muhammad ibn Ismail. Ishaq died as a result of his treatment.Mumtaz Ali Tajddin Sadik Ali Ismaili History: Syrian period The Heritage Society (ismaili.net)
Tahirids and Zaydis, 9th century CE In 195 H (811 CE), Ray stood at the frontier of the territories of Harun's sons, Caliph Muhammad ibn Harun al-Amin and governor Abu Jafar al-Ma'mun ibn Harun. Their advisors had goaded them into war, and when al-Amin's forces, led by former Ray governor 'Ali ibn 'Isa ibn Mahan, marched over the Zagros Mountains from Baghdad, a much smaller, but mobile and well-led defence force, under Tahir ibn al-Husayn, awaited them at Ray. Tahir decided to risk meeting the invaders out on the plain, where his cavalry could be most effective, so the Battle of Ray, brilliantly successful prelude to his counter-invasion of Iraq, actually took place about a day's march from the city.al-Tabari (trans. Michael Fishbein) History, vol. 31: The War Between Brothers, New York, SUNY Press (1992) , p. 51ff When al-Mam'un was thus established as Caliph, Tahir was rewarded with his old governorship of the eastern territories, which continued in the family for decades as a hereditary post.