The Bayon was the last state temple to be built at Angkor, and the only one to be built primarily as a Mahayana Buddhist temple (although various local deities were also worshipped there). It was the centrepiece of Jayavarman VII's building program, and the similarity of the faces on the temple's towers to other statues of the king have led many scholars to the conclusion that the faces are, at least in part, representations of Jayavarman VII (although Avalokitesvara is another possibility). Under the reign of Jayavarman VIII in the mid-13th century the temple was converted to Hinduism. In later centuries Theravada Buddhism became dominant, before the temple was eventually abandoned to the jungle.