the reign of Gajabahu I until the 12th century. It saw various important Buddhist scholars working in both Sanskrit and Pāli. These include (possibly) Upatissa (who wrote the Vimuttimagga), Kavicakravarti Ananda (authored the Saddhammopåyana), Aryadeva, Aryasura, and the tantric masters Jayabhadra, and Candramåli. Development of the Theravāda textual tradition Sri Lankan (Sinhala) Buddhists initially preserved the Buddhist scriptures (the Tipitaka) orally, however, according to the Mahavamsa, during the first century BCE, destruction brought by the Beminitiyaseya led to the writing down of these scriptures to preserve them. The site of this event was at Aluvihāra temple. According to Richard Gombrich this is "the earliest record we have of Buddhist scriptures being committed to writing anywhere". The surviving Pāli texts all derive from the Mahāvihāra tradition. While the other traditions like Abhayagiri no doubt had their own prolific literature, nothing of their work has survived in Pali. Theravāda Buddhists also developed a series of scriptural commentaries (called the Atthakatha). The Theravāda tradition holds that a tradition of Indian commentaries on the scriptures existed even during Mahinda's early days. There were also various commentaries on the Tipitaka written in the Sinhala language, such as the Maha-atthakatha ("Great commentary"), the main commentary tradition of the Mahavihara monks, which is now lost. Furthermore, there were also Sinhala texts that were written to translate and explain the Pali Buddhist teachings to those who did not have knowledge of Pali. The Sinhala language thus developed during the Anuradhapura period under the influence of Pali (as well as Sanskrit and Tamil). As a result of the work of later South Indian scholars who were associated with the Mahāvihāra, mainly Buddhaghosa (4th–5th century CE), Dhammapala and Buddhadatta, Sri Lankan Buddhists adopted Pali as their main scholastic language. This adoption of a lingua franca allowed the Sri Lankan tradition to become more international, allowing easier links with the community in South India and Southeast Asia. These Mahāvihāra Theravāda monks also produced new Pāli literature such as historical chronicles, hagiographies, practice manuals, summaries, textbooks, poetry, and Abhidhamma texts. Buddhaghosa's work on Abhidhamma and Buddhist practice, such as his Visuddhimagga, remains the most influential texts of the modern Theravāda tradition apart from the Pāli Canon. Warfare, decline and restoration of the sangha From the 5th century (after the death of Mahanama in 428 CE) to the eleventh century, the island of Sri Lanka saw the weakening of royal Anuradhapura authority, continuous