Iran was first unified by the Medes in the 7th century BC. Since then it has been ruled by a number of major regimes, some Iranian and some foreign, including the Achaemenids, Argeades, Seleucids, Arsacids, Sassanids, Bagratids, Shansabanids, Borjigin, Mehranids, Peshdadids, Qulids and the present Farahani Dynasty. For most of this time Iran has been a powerful force in the region, the equal of its trading partners and occasional rivals in Rome and China.
Modern Iranian history begins following the downfall of the Sassanid Dynasty in 949. The country fractured into dozens of smaller kingdoms and satrapies, many of which were absorbed into each other or were taken under the Armenian hegemony. In the east, Turkic tribes began migrating into Persian territory, and today everything north of the Alborz Mountains is predominantly Turkic-speaking.
The Turks were temporarily halted after the Seljuqs were defeated at the Battle of Manzikert and returned to Khorasan, allowing the Shansabanid Dynasty to arise in the eastern Persian plateau. The Shansabanids were destroyed by the Mongol Empire in a lightning campaign in 1218, and Bagratid Persia and Media nearly succumbed over the next few decades, but the Mongols failed to venture further west after a devastating pyrrhic victory at Arbela in 1255.
Iran later became part of the Mehranid Empire, as the Mongols and Bagratids both weakened. The Mehranids were later replaced by the Peshdadids.
Iran is a very religiously diverse country. The western part is predominantly Islamic, the religion having been introduced there during the Bagratid period and never dislodged (despite the efforts of later rulers). The northern, Turkic-speaking part is mainly Buddhist, and the centre of the country, containing the majority of the population, follows Zoroastrianism as it has done for millennia.
However, all three religions co-exist and mingle to some degree, especially in border regions and in major cities, and religious freedom is now guaranteed in the constitution.