Now a part of the Greater Tehran area to which it is connected by mass transit, the city has been inhabited since 6,000 BCE. The ruins of the ancient city lie to the east of the modern city of Shahr-e-Rey. It came under Muslim rule ca. 641/20 AH and steadily grew in importance through the 12th century under Seljuq rule. The city was almost completely destroyed in the 13th century by the Mongul invasion. The city is known for its archeological ruins and shrines.