 In 1766 Haider Ali of Mysore defeated the Samoothiri of Kozhikode – an East India Company ally at the time – and absorbed Kozhikode to his state.After the Third Mysore War (1790–1792), Malabar was placed under the control of the Company.Later the status of the Samoothiri as independent rulers was changed to that of pensioners of the Company (1806).