In 1757, to resist the invasion of the Zamorin of Kozhikode, the Palakkad Raja sought the help of the Hyder Ali of Mysore. In 1766, Hyder Ali defeated the Zamorin of Kozhikode – an East India Company ally at the time – and absorbed Kozhikode into his state. The smaller princely states in northern and north-central parts of Kerala (Malabar region) including Kolathunadu, Kottayam, Kadathanadu, Kozhikode, Valluvanad, and Palakkad were unified under the rulers of Mysore and were made a part of the larger Kingdom of Mysore. His son and successor, Tipu Sultan, launched campaigns against the expanding British East India Company, resulting in two of the four Anglo-Mysore Wars. Tipu ultimately ceded the Malabar District and South Kanara to the company in the 1790s as a result of the Third Anglo-Mysore War and the subsequent Treaty of Seringapatam; both were annexed to the Madras Presidency of British India in 1792. The company forged tributary alliances with Kochi in 1791 and Travancore in 1795.