Before the beginning of the Dutch governance, the island of Ceylon was divided between the Portuguese Empire and the Kingdom of Kandy, who were in the midst of a war for control of the island as a whole. The island attracted the attention of the newly formed Dutch Republic when they were invited by the Sinhalese King to fight the Portuguese. Dutch rule over much of the island was soon imposed.
In the late 18th century the Dutch, weakened by their wars against Great Britain, were conquered by Napoleonic France, and their leaders became refugees in London. No longer able to govern their part of the island effectively, the Dutch transferred the rule of it to the British, although this was against the wishes of the Dutch residing there.
As soon as Great Britain gained the European-controlled parts of Ceylon from the Dutch, they wanted to expand their new sphere of influence by making the native Kingdom of Kandy a protectorate, an offer initially refused by the King of Kandy. Although the previous Dutch administration had not been powerful enough to threaten the reign of the Kandyan Kings, the British were much more powerful. The Kandyan refusal to accept a protectorate led eventually to war, which ended with the capitulation of the Kandyans.
The rule of the king Sri Vikrama Rajasinghe was not favoured by his chieftains. The king, who was of South Indian ancestry, faced powerful chieftains and sought cruel measures to repress their popularity with the people. A successful coup was organised by the Sinhala chiefs in which they accepted the British Crown as their new sovereign. This ended the line of the kingdom of Kandy and King Rajasinghe was taken as a prisoner, ending his hope that the British would allow him to retain power. The Kandyan treaty which was signed in 1815 was called the Kandyan Convention and stated the terms under which the Kandyans would live as a British protectorate. The Buddhist religion was to be given protection by the Crown, and Christianity would not be imposed on the population, as had happened during Portuguese and Dutch rule. The Kandyan Convention is an important legal document because it specifies the conditions which the British promised for the Kandyan territory.
It took the ruling families of Kandy less than two years to realise that the authority of the British government was a fundamentally different one to that of the (deposed) Nayakkar dynasty. Soon the Kandyans rebelled against the British and waged a guerrilla war. Discontent with British activities soon boiled over into open rebellion, commencing in the duchy of Uva in 1817, so called the Uva Rebellion, also known as the Third Kandyan War, when, according to a dissertation written by J. B. Müller, the British rulers killed everyone from the Uva-Wellassa region. The main cause of the rebellion was the British authorities' failure to protect and uphold the customary Buddhist traditions, which were viewed by the islanders as an integral part of their lives.