Ramkhamhaeng (sometimes written 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 Ramkhamhaeng on his death. At the age of 19, he took part in his father's successful campaign to capture the city of
Sukhothai, which had formerly been a vassal of the
Khmer Empire. The victory established Sukhothai as an independent kingdom. Owing to his courage in battle, he was reportedly granted the title "Phra Ram Khamhaeng" ("Rama the Bold"). Following his father's death, his elder brother
Ban Mueang ascended the throne and appointed Ramkhamhaeng as ruler of
Si Satchanalai. The
Royal Institute of Thailand has speculated that Ramkhamhaeng's birth name was "Ram"—derived from
Rama, the hero of the Hindu epic
Ramayana—as his name following coronation was recorded as "Pho Khun Ramarat" (). At the time, it was customary to name a grandson after his grandfather. According to both the 11th Stone Inscription and the
Ayutthaya Chronicles compiled by Prasoet Aksoranit, Ramkhamhaeng had a grandson named "Phraya Ram", whose two grandsons in turn were named "Phraya Ban Mueang" and "Phraya Ram". The title Maharat () is the Thai equivalent of "the Great King". ==Accession==