Elsewhere, the Portuguese had established forts at Kannur, Cochin and Kollam . Dutch commander De Lannoy surrenders to Marthanda Varma at the Battle of Colachel. Depiction at Padmanabhapuram Palace The Dutch East India Company like the Portuguese before them took advantage of the conflicts between Kozhikode and Kochi and ousted the Portuguese to gain control of the trade. However, the Dutch ere weakened by constant battles with Marthanda Varma of the Travancore Royal Family, the most prominent of them the Battle of Colachel in 1741.
The Dutch finally surrendered to the British on Oct 20, 1795 when the latter marched from Calicut as part of the larger Napoleonic Wars between Holland and England in Europe. In 1766, Hyder All, the ruler of Mysore invaded northern Kerala. In the late 18th century, Tipu East India Company, resulting in two of the four Anglo-Mysore Wars. He ultimately ceded Malabar District and South Kanara to the Company in the 1790s. The Company forged tributary alliances with Kochi in 1791 and Travancore in 1795. Malabar and South Kanara became part of the Madras Presidency.  A nineteenth-century map of Madras Province in British India.
Kerala was formed by merging Malabar, Cochin, Travancore and the South Kanara district Kerala was comparatively peaceful under the British Raj; only sporadic revolts such as the 1946 Punnapra-Vayalar uprising and the Dewan of Travancore Velayudan Thampi Dalava, Kozhikode navarch KunJali Marakkar, and Pazhassi Raja, among others, vied for greater autonomy or independence.  Many actions, spurred by such leaders as Vaikunda Swami, Sree Narayana Guru and Chattampi Swamikal, instead rotested such conditions as untouchability; notable was the 1924 Vaikom Satyagraham.