The kingdom of Siam signs a trade agreement with Portugal in 1818, the first of its kind, as Siam attempts to protect itself against European influence. In 1824, an alliance was signed with Great Britain, followed by a trade treaty with the United States in 1833. Siam is forced give up territory to the European powers, notably to Britain in Malaysia and France in Cambodia, but the kingdom does manage to keep its independence.
The First Anglo-Burmese War occurs between Britain and Burma, 1824-1826. The fierce Burmese soldiers are defeated. The Second Anglo-Burmese War occurs in 1852, but Burma is again defeated, and Lower Burma, the coastal area, becomes a British colony.
With the help of France, Gia Long becomes emperor of Vietnam (also called Annam), ruling from 1802 to 1820. In 1858 and 1859, because of the persecution of Christians in Vietnam, the French occupy Saigon. By 1862, the French take all of southern Vietnam as a colony called Cochin China. Cambodia, once a major power in the region, is now fought over by Siam and Vietnam. King Norodon of Cambodia asks for French aid in 1863, which makes the kingdom a virtual French colony.
During the war with Napoleon, the British had occupied the Dutch colonies in Indonesia. These were only returned between 1818 and 1820, but the British kept the Malay peninsula (modern Malaysia). At the tip of the peninsula the British built a naval base, Singapore. Under its governor, Sir Stanford Raffles, Singapore became the main British base in southeast Asia.