and graves dating to the fifth century BCE. During the Funan period (1st century - sixth century CE) the Khmer also acquired Buddhism, the concept of the Shaiva imperial cult of the devaraja and the great temple as a symbolic world mountain. The rival Khmer Chenla Kingdom emerged in the fifth century and later conquered the Kingdom of Funan. Chenla was an upland state whose economy was reliant on agriculture whereas Funan was a lowland state with an economy dependent on maritime trade. These two states, even after conquest by Chenla in the sixth century, were constantly at war with each other and smaller principalities. During the Chenla period (5th-8th century), Khmers left the world's earliest known zero in one of their temple inscriptions. Only when King Jayavarman II declared an independent and united Cambodia in 802 was there relative peace between the two lands, upper and lowland Cambodia. Jayavarman II (802–830), revived Khmer power and built the foundation for the Khmer Empire, founding three capitals—Indrapura, Hariharalaya, and Mahendraparvata—the archeological remains of which reveal much about his times. After winning a long civil war, Suryavarman I (reigned 1002–1050) turned his forces eastward and subjugated the Mon kingdom of Dvaravati. Consequently, he ruled over the greater part of present-day Thailand and Laos, as well as the northern half of the Malay Peninsula. This period, during which Angkor Wat was constructed, is considered the apex of Khmer civilization. Khmer Empire (802–1431) The Khmer kingdom became the Khmer Empire and the great temples of Angkor, considered an archeological treasure replete with detailed stone bas-reliefs showing many aspects of the culture, including some musical instruments, remain as monuments to the culture of the Cambodia. After the death of Suryavarman II (1113–50), Cambodia lapsed into chaos until Jayavarman VII (1181–1218) ordered the construction of a new city. He was a Buddhist, and for a time, Buddhism became the dominant religion in Cambodia. As a state religion, however, it was adapted to suit the Deva Raja cult, with a Buddha Raja being substituted for the former Shiva Raja or Vishnu Raja. The rise of the Tai kingdoms of Sukhothai (1238) and Ayutthaya (1350) resulted in almost ceaseless wars with the Khmers and led to the destruction of Angkor in 1431. They are said to have carried off 90,000 prisoners, many of whom were likely dancers and musicians. The period following 1432, with the Khmer people bereft