the eleventh century with the mention of Syam slaves or prisoners of war in Champa epigraphy", and "in the twelfth century, the bas-reliefs of Angkor Wat" where "a group of warriors" are described as Syam. Early states and Sukhothai Kingdom After the decline of the Khmer Empire and Kingdom of Pagan in the early-13th century, various states thrived in their place. The domains of Tai people existed from the northeast of present-day India to the north of present-day Laos and to the Malay peninsula. During the 13th century, Tai people had already settled in the core land of Dvaravati and Lavo Kingdom to Nakhon Si Thammarat in the south. There are, however, no records detailing the arrival of the Tais. Around 1240, Pho Khun Bang Klang Hao, a local Tai ruler, rallied the people to rebel against the Khmer. He later crowned himself the first king of Sukhothai Kingdom in 1238. Mainstream Thai historians count Sukhothai as the first kingdom of Thai people. Sukhothai expanded furthest during the reign of Ram Khamhaeng (r. 1279–1298). However, it was mostly a network of local lords who swore fealty to Sukhothai, not directly controlled by it. He is believed have invented Thai script and Thai ceramics were an important export in his era. Sukhothai embraced Theravada Buddhism in the reign of Maha Thammaracha I (1347–1368). To the north, Mangrai, who descended from a local ruler lineage of Ngoenyang, founded the kingdom of Lan Na in 1292, centered in Chiang Mai. He unified the surrounding area and his dynasty would rule the kingdom continuously for the next two centuries. He also created a network of states through political alliances to the east and north of the Mekong. While in the port in Lower Chao Phraya Basin, a federation around Phetchaburi, Suphan Buri, Lopburi, and the Ayutthaya area was created in the 11th century. Ayutthaya Kingdom According to the most widely accepted version of its origin, the Ayutthaya Kingdom rose from the earlier, nearby Lavo Kingdom and Suvarnabhumi with Uthong as its first king. Ayutthaya was a patchwork of self-governing principalities and tributary provinces owing allegiance to the King of Ayutthaya under the mandala system. Its initial expansion was through conquest and political marriage. Before the end of the 15th century, Ayutthaya invaded the Khmer Empire three times and sacked its capital Angkor. Ayutthaya then became a regional power in place of the Khmer. Constant