Faced with a powerful China in the northeast and a resurgent Siam in the southeast, King Bodawpaya turned westward for expansion. He conquered Arakan in 1785, annexed Manipur in 1814, and captured Assam in 1817–1819, leading to a long ill-defined border with British India. Bodawpaya's successor King Bagyidaw was left to put down British instigated rebellions in Manipur in 1819 and Assam in 1821–1822. Cross-border raids by rebels from the British protected territories and counter-cross-border raids by the Burmese led to the First Anglo-Burmese War (1824–26).
Lasting 2 years and costing 13 million pounds, the first Anglo-Burmese War was the longest and most expensive war in British Indian history, but ended in a decisive British victory. Burma ceded all of Bodawpaya's western acquisitions (Arakan, Manipur and Assam) plus Tenasserim. Burma was crushed for years by repaying a large indemnity of one million pounds (then US$5 million). In 1852, the British unilaterally and easily seized the Pegu province in the Second Anglo-Burmese War.
After the war, King Mindon tried to modernise the Burmese state and economy, and made trade and territorial concessions to stave off further British encroachments, including ceding the Karenni States to the British in 1875. Nonetheless, the British, alarmed by the consolidation of French Indochina, annexed the remainder of the country in the Third Anglo-Burmese War in 1885, and sent the last Burmese king Thibaw and his family to exile in India.