Ayodhaya was a prosperous kingdom, thriving as a trade center between two major port cities—the western Suphan Buri and the eastern Lopburi. The Chao Phraya River ran through it, serving as the heart of the region.The first king of Ayodhaya was from the Lopburi dynasty, but his queen hailed from the Suphan Buri dynasty. As the dynasty changed, the struggle for the throne between the two royal families continued. In 2077 Buddhist Era, King Chaiyanaracha of the Suphan Buri dynasty, who was serving as viceroy in the northern city of Phitsanulok, led his forces to conquer Ayodhaya. He deposed the young King Ratsadathiraj and proclaimed himself the thirteenth monarch of Ayodhaya, known as King Chaiyanaracha.At that time, Ayodhaya was governed by a centralized system, with local lords reduced to nobility, required to pledge direct allegiance to Ayutthaya, and send royal women to serve as principal consorts in all directions, symbolizing the supreme status of the Ayodhaya monarch. While this power structure appeared stable from the outside, it was riddled with resentment from those whose power had been diminished, with the most discontented being the Lopburi royal family, who longed to regain control of the throne.