section_path: History/Medieval period
section_name: Medieval period
paragraph_text: Medieval period
  
  In 641, during the reign of the Sasanian Empire, Yazdgerd III issued his last appeal to the nation from Rhages, before fleeing to Khorasan. Rhages was dominated by the Parthian House of Mihran, and Siyavakhsh —the son of Mehran, the son of Bahram Chobin —who resisted the seventh-century Muslim invasion of Iran. Because of this resistance, when the Arabs captured Rhages, they ordered the town destroyed and rebuilt anew by traitor aristocrat Farrukhzad.
  
  In the ninth century, Tehran was a well-known village, but less so than Rhages, flourishing nearby. Rhages was described in detail by tenth-century Muslim geographers. Despite the interest that Arabian Baghdad displayed in Rhages, the number of Arabs in the city remained insignificant and the population mainly consisted of Iranians of all classes.
  
  The Oghuz Turks invaded Rhages in 1035 and again in 1042, but the city was recovered under the Seljuks and the Khwarezmians. Medieval writer Najm od Din Razi declared the population of Rhages about 500,000 before the Mongol invasion. In the 13th century, the Mongols invaded Rhages, laid the city to ruins, and massacred many of its inhabitants. Others escaped to Tehran. In July 1404, Castilian ambassador Ruy González de Clavijo visited Tehran on a journey to Samarkand, the capital of Turco-Mongol conqueror Timur, the ruler of Iran at the time. He described it in his diary as an unwalled region.