The kingdom's capital was relocated to Thonburi when Ayuthaya fell to Burmese armies in 1767. King Rama I moved the capital across the river to Bangkok in 1782, because the main Burmese threat to the Thai came from the west, on the Thonburi side of the river.