Mahathammaracha IV (Thai: มหาธรรมราชาที่ ๔), born as Ban Mueang (Thai: บานเมือง), was a king of the Sukhothai Kingdom. In 1424, after the death of Sailuethai, Paya Ram and Paya Banmeung the two brothers fought for the throne. Intha Racha of Ayutthaya Kingdom intervened and further divided the kingdom between the two. Their sister had married to Borommaracha II of Ayutthaya and produced a son, Prince Ramesuan is also known as Trilokanat. When Borommapan died in 1446[contradictory] without any heirs, the throne passed to Trailokkanat. Trailokkanat was also crowned as the King of Ayutthaya in 1448, thus began the personal union between the Kingdom of Sukhothai and Ayutthaya.