A Lao rebellion led by Anouvong was defeated in 1827, following which Siam destroyed Vientiane, carried out massive forced population transfers from Laos to the more securely held area of Isan, and divided the Lao mueang into smaller units to prevent another uprising. In 1842–1845 Siam waged a successful war with Vietnam, which tightened Siamese rule over Cambodia. Rama III's most visible legacy in Bangkok is the Wat Pho temple complex, which he enlarged and endowed with new temples.
Rama III regarded his brother Mongkut as his heir, although as a monk Mongkut could not openly assume this role. He used his long sojourn as a monk to acquire a western education from French and American missionaries, one of the first Siamese to do so. He learned English and Latin, and studied science and mathematics. The missionaries no doubt hoped to convert him to Christianity, but in fact he was a strict Buddhist and a Siamese nationalist. He intended using this western knowledge to strengthen and modernise Siam when he came to the throne, which he did in 1851. By the 1840s it was obvious that Siamese independence was in danger from the colonial powers: this was shown dramatically by the British Opium Wars with China in 1839–1842. In 1850 the British and Americans sent missions to Bangkok demanding the end of all restrictions on trade, the establishment of a western-style government and immunity for their citizens from Siamese law (extraterritoriality). Rama III's government refused these demands, leaving his successor with a dangerous situation. Rama III reportedly said on his deathbed: "We will have no more wars with Burma and Vietnam. We will have them only with the West."