By then the entire coastal area was under the British East India Company as a result of the Treaty of Amiens. On 14 February 1815, Kandy was occupied by the British in the second Kandyan War, ending Sri Lanka's independence. Sri Vikrama Rajasinha, the last native monarch of Sri Lanka, was exiled to India. The Kandyan Convention formally ceded the entire country to the British Empire. Attempts by Sri Lankan noblemen to undermine British power in 1818 during the Uva Rebellion were thwarted by Governor Robert Brownrigg.