After the middle of the 14th century AD, the establishment of two kingdoms, namely Lanna in the north with Chiang Mai as its centre and Ayutthaya in the south, put the Kingdom of Sukhothai in a difficult situation since the former could occupy Tak which once was a dependency of Sukhothai while the latter could control the Chao Phraya basin.
          Somdet Phra Ramathibodi I (King U - Thong) of Ayutthaya besieged Song Khawae (Phitsanulok) and took hold of the town. Phra Maha Dharmaraja Li Thai had to pay tribute in return for Song Khawae, and he himself moved to reside there and let Mahadevi, his younger sister reign over Sukhothai. The said incident clearly indicated Sukhothai Kings began to lose their right and authority to rule the whole Kingdom.
          When Somdet Phra Ramathibodi I of Ayutthaya died in 1368 AD, Phra Maha Dharmaraja Li Thai tried to revive Sukhothai to its earlier state as the centre of the Kingdom, but he could not bring his political role into prominence, for he died in 1369 AD. In the meantime, Somdet Phra Borommarachathirat I (Pho Ngua) reigned over Ayutthaya and sent his armed forces to seize Sukhothai and other towns in the Sukhothai Kingdom.
          Thence, the Ayutthayan Royal dynasty made every effort to gradually dominate over the Kingdom of Sukhothai by means of intermarriage between members of the two dynasties, peaceful penetration into aristocratic system and also supply of manpower to Sukhothai royalties who were related to the royal family of the Kingdom of Ayutthaya.
          In 1438 AD at the latest, the whole Kingdom of Sukhothai was apparently annexed to Ayutthaya and was called "northern region" by the Ayutthaya people because in that year Somdet Phra Borommarachathirat II (King Sam Phraya) sent his son, Phra Ramesuan, whose mother was a Sukhothai princess, to rule over the northern region at Phitsanulok as Maha Uparaja (Viceroy) of a dependency of the Ayutthaya Kingdom. When Phra Ramesuan became the king of Ayutthaya in 1450, known as Somdet Phra Boromatrailokanat. When the 'northern region' was invaded by the troop of Lanna, he moved a troop from Ayutthaya to settle in Phitsanulok in 1464. Phitsanulok became the capital of the northern region instead of Sukhothai. And Somdet Phra Boromatrailokanat was the last king who ruled the state and he died at Phitsanulok in 1487.