Bangkok is the capital and the most populous city of Thailand. The city occupies 1,568.7 square kilometres (605.7 sq mi) in the Chao Phraya River delta in Central Thailand. Bangkok traces its roots to a small trading post during the Ayutthaya Kingdom in the 15th century, which eventually grew in size and became the site of two capital cities: Thonburi in 1768 and Rattanakosin in 1782. Bangkok was at the heart of Siam's (as Thailand used to be known) modernization during the later nineteenth century, as the country faced pressures from the West. The city was the centre stage of Thailand's political struggles throughout the twentieth century, as the country abolished absolute monarchy and underwent numerous coups and uprisings.