British victory
  Kingdom of Great Britain
  Frederick North
 Green Howards 19th Regiment of Foot
 King's Own Yorkshire Light Infantry 51st Regiment of Foot
 The Kandyan Wars (or the Kandian Wars) refers generally to the period of warfare between the British colonial forces and the Kingdom of Kandy, on the island of what is now Sri Lanka, between 1796 and 1818. More specifically it is used to describe the expeditionary campaigns of the British Army in the Kingdom of Kandy in 1803 and 1815.
 From 1638–58, the Dutch East India company had intervened in the Sinhalese–Portuguese War, capturing all the Portuguese possessions on the island of Ceylon (now called Sri Lanka). They established the colony of Dutch Ceylon, controlling the coasts and lowlands, whilst the Kingdom of Kandy maintained their independence in the mountainous eastern interior. In 1795 the Dutch Republic was overthrown with French assistance, forming the Batavian Republic as a puppet state. Britain, which was at war with France, feared that influence would result in French control or use of the strategically important port of Trincomalee and others on the island. Following the Kew Letters of 1795, the British occupied Dutch possessions in Sri Lanka. These included not only Trincomalee but Batticaloa, Galle, and Jaffna, as well as the entirety of Sri Lanka's lowlying coastal areas. The new colony of British Ceylon was determined to expand and control the entirety of the island, and had reformed traditional social structures like the caste system and the rajakariya (lit. "kingwork", labour and or tithes owed to the Kandyan king). This added to the tension between them and the still independent Kingdom of Kandy.
 Mountainous central Sri Lanka remained independent, having resisted 250 years of European attempts to control Ceylon. Kandy was now under the rule of the Nayaka kings of Senkadagala. Early British attempts at securing a treaty with mountainous kingdom were rejected. The internal stability of Kandy was shaky, as king Sri Vikrama Rajasinha found himself being constantly undermined and intrigued against by powerful Sinhalese nobles. He also faced a potential usurper in the form of Muttusami, brother-in-law of the previous king Rajadhirajasingha, who had fled to British controlled lands in the early 19th century and had been agitating against the beleaguered king ever since.
 The earliest British garrison numbered about 6,000 which was increased through the recruitment of local sepoys, and the forces of the Empire further enjoyed exclusive access to the sea. Kandy, in contrast, had the advantage of being situated in difficult, mountainous terrain, and could also draw on four hundred years of experience fighting European colonial powers.[citation needed]}
 The first Kandyan war was precipitated by the intrigues of a minister of Sri Vikrama Rajasinha, Pilimatalawe, who defected to the British and offered to show them the way through central Sri Lanka's winding mountain passes to the capital city. Enraged, the King of Kandy had the minister's family executed.
 The British dispatched two separate forces into Kandyan territory - one, under Major-General Hay MacDowall, from Colombo, and another, under a Colonel Barbut, from Trincomalee. These included 51st Regiment of Foot, the 19th Regiment of Foot, the Malay (Muslim) 1st Ceylon Regiment, the all-Sinhalese 2nd Ceylon, and the mixed Sinhalese Malay 3rd Ceylon. In the Kandyan army, at least one contingent was under the command of a Malay Muslim prince called 'Sangunglo', an indicator of the multiethnic nature of the mountainous kingdom. After fierce fighting the British force found Senkadagala deserted in February 1803. They swiftly established a garrison, crowned Muttusami as the new, puppet, king of Kandy, and set about subduing the remainder of the kingdom.
 Despite these early successes the army soon suffered a number of setbacks. The Chief Minister responsible for guiding the British into Kandy had greatly inflated the extent of the king's unpopularity, and resistance proved fierce. The Kandyans resorted to fighting a guerilla war (much the same tactic as they had adopted against the Portuguese and the Dutch) and proved difficult to dislodge. Disease ravaged the garrison left behind in Senkadagala to secure the capital. Perhaps most worrying for them, a number of native sepoys defected to the Kandyans, including a soldier of Malay descent called 'William O'Deen' or 'Odeen', who years later became the first Sri Lankan exiled to Australia.
 The Kandyans counter-attacked in March and seized Senkadagala. Barbut was taken prisoner and executed, and the British garrison wiped out; only one man, Corporal George Barnsley of the 19th Infantry, survived to tell the tale (though other sources put the number of survivors at four). In the meanwhile the retreating British army was defeated on the banks of the flooding Mahaveli river, leaving only four survivors.
 Despite this setback the British still remained unquestioned masters of the lands they possessed, as the disastrous Kandyan counter-campaign later in the year proved. Equipped with a handful of captured six-pound cannon, the Kandyan army advanced through the mountain passes as far as the city of Hanwella. Here the army was utterly routed by superior British firepower, forcing Sri Vikrama Rajasinghe to flee back into the mountains. A general rebellion that had erupted in British-controlled territory on hearing of the Kandyan invasion was suppressed.
 Frederick North, governor of Ceylon from 1798–1805, maintained pressure on the Kandyan frontier with numerous attacks, in 1804 dispatched a force under Captain Arthur Johnston towards Senkadagala. In a pattern that had become clear over the past two hundred or so years, the Kandyans once again defeated the British in the mountainous territory they called home. In 1805, emboldened by their successes, they captured Katuwana, a frontier town. This and the 1803 victory at the Battle of the Mahaveli, were to be Kandy's last, meaningful military successes.
 Though no treaty was signed officially ending the First Kandyan War, the appointment of General Thomas Maitland as governor of Ceylon in 1805 is generally accepted as the end of this first phase of open hostilities.
 Events in the ten years between the end of the First Kandyan War and the Second were such that the complexion of the second conflict was quite different from the first. Whereas in 1805 the British had been forced to contend with a largely hostile native nobility, in 1815 it was this same nobility who essentially invited the British into Kandy and supported their overthrow of Sri Vikrama Rajasingha.
 Governor Thomas Maitland, in British Ceylon, initiated extensive legal and social reforms to further entrench and strengthen British power. These included the reform of the civil service to eliminate corruption, and the creation of a Ceylonese High Court based on caste law. The Catholic population was enfranchised whilst the Dutch Reformed church lost its privileged position. Maitland also worked to undermine Buddhist authority and sought to attract Europeans to the island by allowing grants of up to 4000 acres (16 km²) on the island. He was replaced in 1812/1813 by Sir Robert Brownrigg, who largely continued these policies.
 In contrast, an increasingly paranoid Sri Vikrama Rajasinghe categorically alienated Kandy's powerful nobility and volatile commoners. The construction of Kandy Lake was completed in 1807. Despite its beauty it was a deeply unpopular project, as it served no practical purpose - central Senkadagala had no paddy fields that required irrigation, the traditional cause for the construction of such hydraulic monuments. In 1810 he removed the powerful Pilima Talauve from the position of Chief Minister (1st Adigar). Talauve rebelled the following year and much to the horror of Kandy's nobles was executed. The king further alienated the powerful Buddhist establishment with arbitrary requisitions of land and treasure. Throughout this period John D'Oyly, a British civil servant, was in close contact with various Sinhala nobles, who increasingly seemed to prefer the rule of the British to the volatile government of the Nayaka monarchy.
 The train of events leading directly up to the 1815 war commenced with the humiliation of Ehelepola, Pilima Talauve's nephew and successor as First Adigar. Ehelepola had been involved in several intrigues against the by now deeply unpopular Sri Vikrama Rajasinghe since his appointment in 1810. In 1814 his actions were revealed and the noble fled to British territory. The furious king had Ehelepola's entire family put to death in various gruesome ways. Ehelepola came to symbolize weaknesses of part of the Sri Lankan nobility which assisted in colonisation, and thought of as a great traitor in modern Sinhalese popular thought .Also such siding with European powers is seen of as the key weakness in the subcontinent which enabled colonisation itself. The deaths shocked the Kandyan aristocracy who now openly revolted against the king, who torched his palace and fled to a fortress at Hanguranketha.
 John d'Oyly, in the meanwhile, had been advising Governor Brownrigg for some time that Kandy's nobles were ready to cooperate with any British attempt at dislodging Sri Vikrama Rajasinghe. Kandyan troops soon crossed the British-Kandyan border seeking Ehelepola, and attacked the British garrison at Sitawaka - of itself enough provocation for Brownrigg to dispatch a force to Kandy. The situation was only worsened by the arrival of a group of British traders who Sri Vikrama Rajasingha had ordered mutilated at Hanguranketha.
 The British forces met scant resistance and entered Kandy on the 10 February, 1815, accompanied by John d'Oyly; Brownrigg informed the Admiralty that 'Let by the invitation of the chiefs and welcomed by the acclamations of the people, the forces of His Britannic Majesty, have entered the Kandyan territory and penetrated to the capital. Divine Providence has blessed their efforts with uniform success and complete victory. The ruler of the interior provinces has fallen into their hands and the government remains at the disposal of His Majesty's Representative'. Sometime later Sri Vikrama Rajasinghe's hiding place was discovered; the deposed king was exiled with his harem, to Vellore Fort in India, where he died 17 years later. His son, and potential heir, died childless in 1842.
 The single most important event following the arrival of British forces in Kandy  was the signing of the Kandyan Convention. Essentially a treaty of annexation, it was agreed to in March 1815 after negotiations between John d'Oyly and the nobles of Kandy. The central points of the agreement were:
 The signatories of the convention were Governor Brownrigg, Ehelepola and the lords (called 'Dissawes' in Sinhalese) Molligoda, Pilimatalawe the Elder, Pilimatalawa the Younger, Monerawila, Molligoda the Younger, Dullewe, Ratwatte, Millawa, Galgama and Galegoda. The signatures were witnessed by d'Oyly, who became British Resident and effective governor in the area, and his private secretary James Sutherland.
 The convention is interesting in many ways. It represents the theoretically voluntary transferral of authority in Kandy to the British, and indeed later events showed that the Kandyan nobility did hope that they were simply replacing one malleable master (the Nayakkar monarchy) with another (the British). Indeed, Ehelepola appears to have hoped that the new master would not be the British at all, but himself.
 The nobles and religious potentates of Kandy were also adamant in including clause 5 concerning the protection of Buddhism. Later in 1815 the heads of the Buddhist monasteries at Malwatte and Asgiriya both met Governor Brownrigg and extracted guarantee that Buddhism would not be compromised. This included a ban on proselytising and mission schools.
 It took the ruling families of Kandy less than two years to realise that the authority of the British government was of a fundamentally different type to that of the (deposed) Nayakkar monarchy. Discontent with British activities soon boiled over into open rebellion, commencing in the duchy of Uva in 1817. Generally called the 'Uva Rebellion', it is also known as the Third Kandyan War. In many ways the third name is more appropriate, as the rebellion (which soon developed into a guerilla war of the kind the Kandyans had fought against European powers for some time) was centred on the Kandyan nobility and their unhappiness with developments under British rule since 1815. However it is the last uprising of this kind and Britain's response essentially abolished the old aristocracy and ensured future rebellions would take on a much more subdued character.
 The Ceylon Medal was instituted by the Ceylonese Government in 1819, the only gallantry medal struck for the Kandyan Wars.
 The British capture of the kingdom of Kandy marked not only the end of the 400-year-old Kingdom of Kandy, but also of all native political independence. Kandy, as a result of its geographical and political isolation, had developed unique cultural and social structures that were now subject to the intense pressures of outside rule and underwent immense upheaval and change.
 Before 1815, much of Kandy's territory had been underdeveloped with unreliable dirt-track roads for access, apart from a few 'royal roads'. The British proceeded to transform the hill country by constructing roads across previously inaccessible terrain (such as the Kadugannawa Pass), and, in 1867, building the first railway. The other big transformation was the introduction of tea to central Sri Lanka in 1867 and the massive settlement of Tamils in the region. Central Sri Lanka is now dominated by the vast tea estates that helped make Sri Lanka the world's biggest exporter of tea for a while, and were still owned by British companies in 1971.
 A lasting legacy of the same war in Ireland is the traditional anti-war and anti-recruitment song "Johnny I Hardly Knew Ye", depicting a soldier from Athy, County Kildare who comes home horribly mutilated from the war in "Sulloon" (Ceylon).