 The old city was founded in Tambon Chaksi.King Ramathibodi I (Uthong) of Ayutthaya Kingdom set "Mueang Sing", "Mueang In", and "Mueang Phrom" as the inner cities under Lopburi, the northern frontier city of Ayutthaya.In the reign of King Trailokanat, government administration was reformed and the three cities were downgraded to be level four cities (เมืองจัตวา) because they were not far from the capital of the kingdom.