In the aftermath of the fall of the Ayutthaya Kingdom in 1767, attempts were made to set up five separate states, with Prince Teppipit, a son of king Boromakot, attempting to establish Phimai as one, holding sway over eastern provinces including Nakhon Ratchasima.