Borommatrailokkanat (Thai: บรมไตรโลกนาถ) or Trailok was the king of the Ayutthaya Kingdom from 1448 to 1488. He was one of many monarchs who gained the epithet King of White Elephants (Thai: พระเจ้าช้างเผือก). He was the first Thai king to possess a "noble" or white elephant, which, according to Hindu belief, was a "glorious and happy sign". His reign was also known for a massive reforms of Thai bureaucracy and a successful campaign against Lan Na. He was also revered as one of the greatest monarchs of Thailand.
Prince Ramesuan (not to be confused with King Ramesuan r. 1369–1370) was born in 1431 to King Borommarachathirat II or Chao Sam Phraya and his queen from the Sukhothai Kingdom. He became the Uparaja (lit. vice-king of crown princes) in 1438. When his cousin, Borommapan of Sukhothai, died in 1438, Ramesuan was then technically the king of Sukhothai although he was too young to be crowned. Upon reaching majority, Borommaracha II sent Ramesuan to Phitsanulok to assume the Sukhothai throne.
Borommaracha II died in 1448, Prince Ramesuan was then crowned King Borommatrailokkanat of Ayutthaya, making a personal union between Sukhothai and Ayutthaya.
In 1485, Borommatrailokkanat appointed his son Prince Chaiyachettha (later Ramathibodi II) as the Uparaja and King of Sukhothai. The title "King of Sukhothai" then became a title for Ayutthayan Crown Prince. However, upon Borommatrailokkanat's death in 1488, his two sons inherited the two kingdoms, thus separating the union once again.