The best known of this literary elite was Ferdowsi, whose "Shahnameh", completed around 1000 CE, is partly based on Sasanian and earlier oral and literary tradition. In Ferdowsi's take on the legends, the first man and first king created by Ahura Mazda are the foundations of Iran. At the same time, Iran is portrayed to be under threat from Aniranian peoples, who are driven by envy, fear and other evil demons ("dew"s) of Ahriman to conspire against Iran and its peoples. "Many of the myths surrounding these events, as they appear the "Shahnameh", were of Sasanid origin, during whose reign political and religious authority become fused and the comprehensive idea of Iran was constructed."