One of the most important Thai literary works is the Ramakian (รามเกียรติ์), a uniquely Thai version of the Indian epic, the Ramayana. Early Thai version of the Ramakian was lost in the destruction of Ayutthaya. The longest of the three present versions was written in 1798 by the first Chakri King, Rama I, and a group of intimates, who incorporated Thai and Buddhist elements into it to preserve oral knowledge of Ayutthaya state rites and traditions. Indeed, King Rama I's Ramakian is the major historical source of medieval Thai courtly traditions.