Under Rama I (1782–1809), Rattanakosin successfully defended against Burmese attacks and put an end to Burmese incursions. He also created suzerainty over large portions of Laos and Cambodia. In 1821, Briton John Crawfurd was sent to negotiate a new trade agreement with Siam – the first sign of an issue which was to dominate 19th century Siamese politics. Bangkok signed the Burney Treaty in 1826, after the British victory in the First Anglo-Burmese War. Anouvong of Vientiane, who mistakenly held the belief that Britain was about to launch an invasion of Bangkok, started the Lao rebellion in 1826 which was suppressed. Vientiane was destroyed and a large number of Lao people was relocated to Khorat Plateau as a result. Bangkok also waged several wars with Vietnam, where Siam successfully regained hegemony over Cambodia.
From the late-19th century, Siam tried to rule the ethnic groups in the realm as colonies. In the reign of Mongkut (1851–1868), who recognized the potential threat Western powers posed to Siam, his court contacted the British government directly to defuse tensions. A British mission led by Sir John Bowring, Governor of Hong Kong, led to the signing of the Bowring Treaty, the first of many unequal treaties with Western countries. This, however, brought trade and economic development to Siam. The unexpected death of Mongkut from malaria led to the reign of underage Prince Chulalongkorn, with Somdet Chaophraya Sri Suriwongse (Chuang Bunnag) acting as regent.