The extensive irrigation projects provided rice surpluses that could support a large population. The state religion was Hinduism but influenced by the cult of Devaraja, elevating the Khmer kings as possessing the divine quality of living gods on earth, attributed to the incarnation of Vishnu or Shiva. In politics, this status was viewed as the divine justification of a king's rule. The cult enabled the Khmer kings to embark on massive architectural projects, constructing majestic monuments such as Angkor Wat and Bayon to celebrate the king's divine rule on earth.