Ram Khamhaeng

Ram Khamhaeng (, ) or Pho Khun Ram Khamhaeng Maharat (, ), also spelled Ramkhamhaeng, was the third king of the Phra Ruang Dynasty, ruling the Sukhothai Kingdom (a historical kingdom of Thailand) from 1279 to 1298, during its most prosperous era. 
He is credited for the creation of the Thai alphabet and the firm establishment of Theravada Buddhism as the state religion of the kingdom.
Birth and name.
Ram Khamhaeng was a son of Pho Khun Bang Klang Hao, who ruled as Pho Khun Si Inthrathit, and his queen, Sueang, though folk legend claims his real parents were an ogress named Kangli and a fisherman. He had two brothers and two sisters. The eldest brother died while very young. The second, Ban Mueang, became king following their father's death, and was succeeded by Ram Khamhaeng on his own death.
At age 19, he participated in his father's successful invasion of the city of Sukhothai, formerly a vassal of the Khmer, establishing the independent Sukhothai Kingdom. Due to his courage in the war, he allegedly was given the title "Phra Ram Khamhaeng” or “Rama the Bold”. After his father's death, his brother Ban Mueang ruled the kingdom, assigning Ram Khamhaeng control of the city of Si Satchanalai.
The Royal Institute of Thailand speculates that Ram Khamhaeng's birth name was "Ram" (derived from Rama, the name of the hero of the Hindu epic Ramayana), for his name following his coronation was "Pho Khun Ramarat" (). Furthermore, the tradition at the time was to give the name of a grandfather to a grandson; according to the 11th Stone Inscription and Luang Prasoet Aksoranit's Ayutthaya Chronicles, Ram Khamhaeng had a grandson named "Phraya Ram", and two grandsons of Phraya Ram were named "Phraya Ban Mueang" and "Phraya Ram".
In English, an alternate spelling of his name is Ramkhamhaeng. The title Maharat () is the Thai translation of “the Great”.
Accession.
Tri Amattayakun (), a Thai historian, suggests that Ram Khamhaeng should have acceded to the throne in 1279, the year he planted a sugar palm tree in Sukhothai. Prasoet na Nakhon of the Royal Institute speculates that this was a tradition of Thai-Ahom monarchs, who planted banyan or sugar palm trees on their coronation day in the hope that their reign would achieve the same stature as the tree. The most significant event at the beginning of his reign, however, was the elopement of one of his daughters, May Hnin Thwe-Da, with the captain of the palace guards, a commoner. The commoner founded the Burmese Hanthawaddy Kingdom and commissioned compilation of the Code of Wareru, which provided a basis for the law of Thailand used in Siam until 1908, and in Burma to the present.
Reign.
Ram Khamhaeng sent embassies to Yuan Mongol from 1282 to 1323 and imported the techniques to make the ceramics now known as Sangkhalok ceramic ware. He had close relationships with the rulers of nearby city-states, especially Ngam Muang, the ruler of neighboring Phayao (whose wife, according to legend, he seduced), and King Mangrai of Chiang Mai. His campaign against Cambodia left the Khmer country "utterly devastated." 
According to Thai history, Ram Khamhaeng is credited with creating the Thai alphabet ("Lai Nangsue Thai") from a combination of the Sanskrit, Pali, and Grantha alphabets.
It is speculated that Ram Khamhaeng expanded his kingdom as far as Lampang, Phrae, and Nan in the north, Phitsanulok and Vientiane in the east, the Nakhon Si Thammarat Kingdom in the south, the Mon kingdoms of what is now Myanmar in the west, and the Bay of Bengal in the northwest. However, in the "mandala" political model, kingdoms such as Sukhothai lacked distinct borders, instead being centered on the strength of the capital itself. Claims of Ram Khamhaeng's large kingdom were intended to assert Siamese dominance over mainland Southeast Asia.
Death.
According to the Chinese "History of Yuan", King Ram Khamhaeng died in 1298 and was succeeded by his son, Loe Thai, though George Cœdès thinks it "more probable" it was "shortly before 1318". Legend states he disappeared in the rapids of the rivers of Sawankhalok. Another possible source states he was slain by a Malay warrior princess named Adruja Sriwijayamala Singha during a battle between Thai and Malay armies, in a campaign to conquer Malay lands which make up a third of modern Thailand today.
Legacy.
The Ram Khamhaeng Inscription.
Much of the traditional biographical information comes from the inscription on the Ram Khamhaeng stele, composed in 1292, and contains vague facts about the king. It is now found in the Bangkok National Museum. The formal name of the stele is the "King Ram Khamhaeng Inscription". It was added to the Memory of the World Register in 2003 by UNESCO.
Sangkhalok ceramic ware.
Ram Khamhaeng is credited with bringing the skills of ceramic making from China and laying the foundation of a strong ceramic ware industry in the Sukhothai Kingdom. Sukhothai for centuries was the major exporter of the ceramics known as "Sangkhalok ware" () to countries such as Japan, the Philippines, Indonesia, and even to China. The industry was one of the main revenue generators during his reign and long afterwards.
Banknote.
The reverse of the 20 Baht note (series 16), issued in 2013, depicts images of the royal statue of Ram Khamhaeng seated on the Manangkhasila Asana Throne, and commemorates the invention of the Thai script by the king.
Honour.
Ramkhamhaeng University, the first open university in Thailand with campuses throughout the country, was named after Ram Khamhaeng.
Video games.
King Ramkhamhaeng is a playable ruler for the Siamese in "Sid Meier's Civilization V".