The Khmer Empire grew out of these remnants of Chenla, becoming firmly established in 802 when Jayavarman II (reigned  - ) declared independence from Java and proclaimed himself a Devaraja. He and his followers instituted the cult of the God-king and began a series of conquests that formed an empire which flourished in the area from the 9th to the 15th centuries. During the rule of Jayavarman VIII the Angkor empire was attacked by the Mongol army of Kublai Khan, however, the king was able to buy peace. Around the 13th century, Theravavada missionaries from Sri Lanka reintroduced Theravada Buddhism to Southeast Asia; having sent missionaries previously in 1190s. The religion spread and eventually displaced Hinduism and Mahayana Buddhism as the popular religion of Angkor; however it was not the official state religion until 1295 when Indravarman III took power.