In the first half of the 13th century, the territory of what is now central and northern Thailand was under the rule of the Khmer Empire, centered at Angkor. In 1238, local rulers Pho Khun Bang Klang Khao and Pha Muang staged a rebellion, expelled the Khmers, and declared independence. Thus, the Kingdom of Sukhothai was born. The new ruler took the name Si Indraditya and became the founder of the Pho Kong dynasty. Sukhothai's true heyday came during the reign of King Ramkhamhaeng the Great (1279–1298). He is considered one of the key figures in Thai history:
- developed and approved the Thai alphabet (based on Pali and Old Khmer script);
- strengthened Buddhism as the state religion;
- developed trade with China, Lanna and other kingdoms in the region;
- created a system of government in which the king was considered the "father of the people."