Northern Thailand the oldest region in Thailand the main ethnic group Tai-Lue established their own kingdoms: the semi-legendary Singhanavati Kingdom (691 BCE–638 CE) evolved into the Ngoenyang Kingdom (638–1292). In 1220, the Khmer controlled Sukhothai was conquered by the Thais and made the capital of the Sukhothai Kingdom. By 1220, the long declining Khmer Empire was mostly overrun by Thais. By the 13th century, the Sukhothai Kingdom (1238–1438) had replaced the Mon kingdoms in Central Thailand. During the reign of King Ramkhamhaeng the Thai script was created in 1283, the arts flourished, Thai institutions were developed, and people called themselves "Thai" as freed people from foreign rule.
In 1351, the Suphannabhum city-state (modern-day Suphan Buri), and Lavo city-state (modern-day Lop Buri) merged into the Ayutthaya Kingdom (Tai-Lue from the Northern+Monic from Chao Phra Ya river basin = Siamese Kingdom) which was founded near the Chao Phraya River. Duarte Fernandes was the first European to arrive in Ayutthaya in 1511.