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.