An?r?n (Middle Persian, ) or An?rân (Modern Persian, ) is an ethno-linguistic term that signifies "non-Iranian" or "non-Iran" (non-Aryan). Thus, in a general sense, 'Aniran' signifies lands where Iranian languages are not spoken. In a pejorative sense, it denotes "a political and religious enemy of Iran and Zoroastrianism."
The term 'Aniran' derives from Middle Persian an?r?n, Pahlavi 'nyr'n, an antonym of ?r?n that in turn denoted either the people or the Sasanian Empire. However, "in Zoroastrian literature and possibly in Sasanian political thought as well, the term has also a markedly religious connotation. An an?r person is not merely non-Iranian, but specifically non-Zoroastrian; and an?r designates also worshipers of the d?ws ("demons") or adherents of other religions." In these texts of the ninth to twelfth century, "Arabs and Turks are called an?r, as are Muslims generally, the latter in a veiled manner."
In official usage, the term is first attested in inscriptions of Shapur I (r. 241-272), who styled himself the "king of kings of ?r?n and An?r?n." Shapur's claim to An?r?n reflected the emperor's victories over Valerian and Philip, and staked a claim against the Roman Empire, the enemies of the Sassanid state. This is also reflected in Shapur I's inscription at the Ka'ba-ye Zartosht, where the emperor includes Syria, Cappadocia, and Cilicia - all three previously captured from the Romans -- in his list of An?r?n territories.
The proclamation as "king of kings of ?r?n and An?r?n" remained a stock epithet of subsequent Sassanid dynasts. Thirty years after Shapur, the Zoroastrian high-priest Kartir included the Caucasus and Armenia in his list of An?r?n territories. In this, Kartir's inscription (also at Ka'ba-ye Zartosht) contradicts Shapur's, which included the same two regions in his list of regions of ?r?n.
In the ninth to twelfth century Zoroastrian texts, the legendary Turanian king and military commander Afrasiab is (together with Dahag and Alexander) the most hated among the beings that Ahriman (Avestan Angra Mainyu) set against the Iranians (Zand-i Wahman yasn 7.32; Menog-i Khrad 8.29)
In the Shahnameh, the poet Ferdowsi draws on Zoroastrian scripture (with due attribution) and retains the association of Aneran with the Turanians. From the point of view of Ferdowsi's home in Khorasan, this identification coincides with the Avestan notion (e.g. Vendidad 7.2, 19.1) that the lands of Angra Mainyu (Middle Persian: Ahriman) lay to the north. The two sources do however diverge with respect to details. In the Avesta, Sogdia (Avestan Sughdha, present-day Sughd and Samarqand Regions) is not An?r?n - Sogdia is one of the sixteen lands created by Mazda, not one of the lands of Angra Mainyu.
Nonetheless, for Ferdowsi the division between ?r?n and An?r?n is just as rigid as it is in the Avesta: When the primordial king Fereydun (Avestan ?ra?taona) divides his kingdom - the whole world - among his three sons, he gives the Semitic lands in the west to the eldest, the lands of the north to his middle son Tur (Avestan Turya, hence the name "Turanian"), and ?r?n to his youngest (Shahnameh 1.189).[better source needed] In the story, this partition leads to a family feud in which an alliance of the two elder sons (who rule over the An?r?nian lands) battle the forces of the youngest (the Iranians). The Iranians win.
For Ferdowsi, the Turanians/An?r?nians (often used interchangeably) are unquestionably the villains of the piece. Their conflict with Iranians is the main theme of the Shahnameh and accounts for more than half of the text. The deaths of heroes and other admirable figures are frequently attributed to Turanians. Thus Shahnameh 5.92 says a Turanian raider named Tur-Baratur killed the 77-year-old Zoroaster in Balkh.