Around 1181 CE, Jayavarman VII was crowned king after driving Cham invaders from Angkor, which they had sacked in 1177. He then launched the most ambitious construction program in Southeast Asian history, building the walled capital Angkor Thom, the Bayon temple with its iconic stone faces, Ta Prohm, Preah Khan, and a network of over 100 hospitals and rest houses across the empire. He converted the state religion from Hinduism to Mahayana Buddhism. Under his rule the Khmer Empire reached its maximum territorial extent, encompassing much of modern Cambodia, Thailand, Laos, and southern Vietnam.