"Devarāja" is the Hindu-Buddhist cult of deified royalty in Southeast Asia. It could be simply described as Southeast Asian concept of divine king. The concept viewed the monarch to possess transcendental quality, the king as the living god on earth, the incarnation of the supreme god, often attributed to Shiva or Vishnu. The concept is closely related to Indian concept of Chakravartin (universal monarch). In politics, it is viewed as the divine justification of a king's rule. The concept was institutionalized and gain its elaborate manifestations in ancient Java and Cambodia, where monuments such as Prambanan and Angkor Wat were erected to celebrate the king's divine rule on earth.
In Sanskrit the term deva-raja could have different meanings such as "god-king" or "king of the gods". In Hindu pantheon the king of gods is often attributed to Shiva, sometimes Vishnu, or previously Indra. Thus the mortal kingdom on earth mirrored the celestial kingdom of gods, the concept regarded the king as the living god on earth.
The devaraja concept has been established through rituals and institutionalized within the Indianized kingdoms of Southeast Asia. It enables the monarch to claim the divine authority which could be use on ensuring political legitimacy, managing social order, economic and religious aspects. In political aspect it strengthen the justification of the king and the ruling dynasty as the righthful ruler of the land. It also used to maintain social order, exalting the king as living god definitely demands the utmost service and devotion of his people. Introducing the Indian caste system also defining social class, occupations, as well as the way of life of their people.
The devaraja cult also enabled the king to embarke on large scale public works and grand projects, by mobilizing their people to create and maintain elaborate hydraulic irrigation system to support large scale rice agriculture, or to construct imposing grand monuments and temples in the king's honor. The example of this grand projects are Borobudur, Prambanan, also temples and baray in Angkor.
The cult of devaraja or God King was the ancient Cambodian state religion, while it may have originated in Java. Circa 8th century, Sailendras allegedly ruled over Java, Sumatra, the Malay Peninsula and parts of Cambodia. In ancient Java, since Sailendra dynasty, or even older Tarumanagara kingdom, the state religion regarded the king as god incarnated on earth. The Tarumanagara fifth century CE Ciaruteun inscription, inscribed with king's sole print, regarded King Purnawarman as incarnation of Vishnu on earth. The Kebon Kopi I inscription, also called Telapak Gajah stone, with an inscription and the engraving of two large elephant footprints, associated king's elephant ride as Airavata (elephant ride of God Indra), thus associated the king also with Indra.
In Medang kingdom, it is customary to erect candi (temple) to honor and sent the soul of a dead king. The image of god inside the garbhagriha (central chamber) of the temple often portrayed the deceased king as a god, as the soul of the dead king finally united with the revered god in svargaloka. Some archaeologists propose that the statue of Shiva in the garbhagriha of Prambanan main temple was modelled after King Balitung, serving as a depiction of his posthumous deified self. It is suggested that the cult was the fusion of Hinduism with native Austronesian ancestor worship. In Java, the tradition of divine king continued well to Kediri, Singhasari, and Majapahit kingdom in 15th century.
After the coming of Islam in the archipelago and the fell of Majapahit, the concept of God-King were most likely ceased to exist in Java, since Islam rejects the concept of divinity in mortal human being. Yet the concept survived in traditional Javanese mysticism of Kejawen as wahyu, suggesting that every king and rulers in Java was bestowed wahyu, a divine authority and mandate from God. A heavenly mandate that could be revoked and transferred by God, to explain the change of dynasty in Java during Demak, Mataram Sultanate era, well to the succession of the president of Indonesia.
In a Khmer context the term was used in the latter sense as "god-king", but occurs only in the Sanskrit portion of the inscription K. 235 from Sdok Kak Thom / Sdok Kăk Thoṃ (in modern Thailand) dated 8 February 1053 CE, referring to the Khmer term kamrateṅ jagat ta rāja ("Lord of the Universe who is King") describing the protective deity of the Khmer Empire, a distinctly Khmer deity, which was mentioned before in the inscription K. 682 of Chok Gargyar (Kòḥ Ker) dated 921/22 CE.
In the Sdok Kăk Thoṃ inscription a member of a Brahman family claimed that his ancestors since the time of Jayavarman II (Khmer: ជ័យវរ្ម័នទី២), who established around 800 CE by marriage to the daughter of a local king in the Angkor region a small realm which became at the end of the 9th century the famous Khmer Empire, were responsible for the cult of the Devarāja (kamrateṅ jagat ta rāja). Historians formerly dated his reign as running from 802 CE to 850 CE, but these dates are of very late origin (11th century) and without any historical basis. Some scholars now have tried to identify Jayavarman II with Jayavarman Ibis who is known from his inscriptions from Práḥ Thãt Práḥ Srĕi south of Kompoṅ Čàṃ (K. 103, dated 20 April 770 and from Lobŏ’k Srót in the vicinity of Kračèḥ close to the ancient town of Śambhupura (K. 134, dated 781 CE). The Sdok Kăk Thoṃ inscription incised c. 250 years after the events (of which their historicity is doubtful) recounts that on the top of the Kulen Hills, Jayavarman II instructed a Brahman priest named Hiraṇyadāman to conduct a religious ritual known as the cult of the devarāja (Khmer: ទេវរាជា) which placed him as a cakravartin, universal monarch, a title never heard of before in Cambodia.
Today, the tradition of public reverence to the King of Cambodia is said to be the continuation of this ancient devaraja cult, and is mistakenly said of the King of Thailand.