During the Napoleonic Wars the United Kingdom, fearing that French control of the Netherlands might deliver Sri Lanka to the French, occupied the coastal areas of the island (which they called Ceylon) with little difficulty in 1796. In 1802 by the Treaty of Amiens the Dutch part of the island was formally ceded to Britain, and became a crown colony. In 1803 the British invaded the Kingdom of Kandy in the 1st Kandyan War, but were bloodily repulsed. In 1815 Kandy was occupied in the 2nd Kandyan War, finally ending Sri Lankan independence. Following the bloody suppression of the Uva Rebellion or 3rd Kandyan War in 1817–1818, a treaty in 1818 preserved the Kandyan monarchy (Nayaks of Kandy) as a British dependency.
The Kandyan peasantry were stripped of their lands by the Wastelands Ordinance, a modern enclosure movement and reduced to penury. The British found that the uplands of Sri Lanka were very suited to coffee, tea and rubber cultivation, and by the mid 19th century Ceylon tea had become a staple of the British market, bringing great wealth to a small class of white tea planters. To work the estates, the planters imported large numbers of Tamil workers as indentured labourers from south India, who soon made up 10% of the island's population. These workers had to work in slave-like conditions and to live in line rooms, not very different from cattle sheds.
The British colonialists favoured the semi-European Burghers, certain high-caste Sinhalese and the Tamils who were mainly concentrated to the north of the country, exacerbating divisions and enmities which have survived ever since. Nevertheless, the British also introduced democratic elements to Sri Lanka for the first time in its history. The Burghers were given some degree of self-government as early as 1833. It was not until 1909 that constitutional development began with a partly-elected assembly, and not until 1920 that elected members outnumbered official appointees. Universal suffrage was introduced in 1931, over the protests of the Sinhalese, Tamil and Burgher elite who objected to the common people being allowed to vote.