Cambodia, Siem Reap. The city of Angkor served as the royal centre from which a dynasty of Khmer kings ruled one of the largest, most prosperous, and most sophisticated kingdoms in the history of Southeast Asia. From the last decade of the 9th century, when King Yashovarman I made Angkor his place of residence, until the early years of the 13th century, the kings of Angkor ruled over a territory that extended from the tip of the Indochinese Peninsula northward to modern Yunnan province, China, and from Vietnam westward toward the Bay of Bengal. During this entire period, these rulers utilized the vast resources of labour and wealth at their disposal to carry out a series of prodigious construction projects designed to glorify both themselves, their gods, and their capital city. After the reign of King Jayavarman VII (1181–c. 1220), the power and vitality of the kingdom gradually waned until finally, after the armies of the Tai state of Ayutthaya (Ayudhia) captured and sacked Angkor in 1431, the city was partially abandoned.