themselves. The office of chief scholar is first attested in the reign of the Neo-Assyrian king Tukulti-Ninurta II. Most of the surviving ancient Assyrian literature comes from the Neo-Assyrian Library of Ashurbanipal, which included more than 30,000 documents. Libraries were built in the Neo-Assyrian period to preserve knowledge of the past and maintain scribal culture. Neo-Assyrian texts fall into a wide array of genres, including divinatory texts, divination reports, treatments for the sick (either medical or magical), ritual texts, incantations, prayers and hymns, school texts and literary texts. An innovation of the Neo-Assyrian period were the annals, a genre of texts recording the events of the reigns of a king, particularly military exploits. Annals were disseminated throughout the empire and probably served propagandistic purposes, supporting the legitimacy of the king's rule. Various purely literary works, previously aligned by scholars with propaganda, are known from the Neo-Assyrian period. Such works include, among others, the Underworld Vision of an Assyrian Crown Prince, the Sin of Sargon and the Marduk Ordeal. In addition to their own works, the Assyrians also copied and preserved earlier Mesopotamian literature. The inclusion of texts such as the Epic of Gilgamesh, the Enûma Eliš (the Babylonian creation myth), Erra, the Myth of Etana and the Epic of Anzu in the Library of Ashurbanipal is the primary reason for how such texts have survived to the present day. Religion Ancient Assyrian religion Knowledge of the ancient polytheistic Assyrian religion, referred to as "Ashurism" by some modern Assyrians, is mostly limited to state cults given that little can be ascertained of the personal religious beliefs and practices of the common people of ancient Assyria. The Assyrians worshipped the same pantheon of gods as the Babylonians in southern Mesopotamia. The chief Assyrian deity was the national deity Ashur. Though the deity and the ancient capital city are commonly distinguished by modern historians through calling the god Ashur and the city Assur, both were inscribed in the exact same way in ancient times (Aššur). In documents from the preceding Old Assyrian period, the city and god are often not clearly differentiated, which suggests that Ashur originated sometime in the Early Assyrian period as a deified personification of the city itself. Below Ashur, the other Mesopotamian deities were organized in a hierarchy, with each having their own assigned roles (the sun-god Shamash was for instance regarded as a god of justice and Ishtar