The northern kingdoms of Kerala known as Malabar [Chirakkal, Kottayam, Kadathanad & Calicut] became part of the Mysore kingdom in 1766 during the reign of Hyder Ali Khan.
The kingdom of Travancore [Thiruvithamkoor] situated on the southern side of Kerala was an ally of the British East India Company. At this time the Raja of Travancore was Rama Varma popularly known as Dharma Raja (r: 1758-1798).
Hyder's enmity with Travancore had started in the time of Rama Varma's uncle and predecessor Marthanda Varma (r: 1729-1758). In 1754 when Hyder was the faujdar of Dindigul Raja Marthanda Varma had requested his help to suppress a revolt in some newly conquered territories. Hyder had readily offered the assistance but when the rebel chiefs got knowledge of Hyder's arrival they were frightened and submitted to the Raja. Therefore the Raja informed Hyder that he no longer required his services. According to some records Hyder demanded compensation but Marthanda Varma refused to pay the expense.
The Rajas of Travancore, Cochin and Cranganore [Kodungallur] were allies of the Dutch East India Company. Hyder agreed to spare Cochin on payment of an annual tribute of 4 lacs of rupees and 8 elephants and Travancore for 15 lacs of rupees and 30 elephants. The Raja of Cochin agreed this; but Rama Varma refused to become a tributary of Mysore on the ground that Travancore was already a tributary of the Nawab of Arcot Muhammad Ali Khan Wallajah and could not afford to be a vassal of two powers at the same time; still he will give a considerable sum of money [about 1200000 rupees] if Hyder Ali would reinstate the Kolathiri [king of Chirakkal] and the Zamorin or Samoothiri [king of Kozhikode / Calicut] in their respective dominions.
Knowing that this answer would not satisfy Hyder who would attack Travancore sooner or later, Rama Varma began preparations to strengthen the Travancore Lines and established a close alliance with the British.
However, before Hyder could proceed against Travancore, he heard the news of the advance of the Nizam and the Marathas on Mysore. Therefore he hastened to Srirangapatna in January 1767. First Anglo-Mysore war (1767-1769) followed.
Raja Rama Varma was intended to reinstate all rulers who had been expelled from Malabar on conditions favourable to him, so that eventually he could take control of the whole Malabar.
While Hyder was engaged in the 1st Anglo-Mysore war, the Nairs of Chirakkal, Kottayam, Kadathanad, and Calicut supported by auxiliaries from Travancore and with munitions by the British at Tellichery revolted and expelled Hyder's troops from many places. Finally Hyder decided to come to an arrangement with the expelled chiefs. In 1768-69 Madanna [Hyder's governor in Calicut] on orders from Hyder gave up Malabar [except Palakkad and Cannanore] at the cost of 1200000 rupees.
In 1773, Hyder Ali returned to Malabar and reconquered it. The Raja of Cochin accepted Mysore suzerainty by paying two lacs of rupees and a few elephants while the Raja of Cranganore paid rupees 3 lacs and two elephants.
At Hyder's approach the Zamorin and other chiefs fled to Travancore. Rama Varma gave shelter to the dispossessed chieftains and incited them to rebel against Mysore. They were provided with funds to carry on their activities.
Hyder was determined to conquer Travancore when he learnt the rebellious activities of the Raja. He was convinced that as long as the Raja remained unsubdued, he could never feel secure in Malabar.
In 1776, Hyder's army under his general Sardar Khan proceeded to invade Travancore, but the Dutch who had established themselves at the northern frontier of Travancore, stood a barrier to his progress.
Hyder demanded the Dutch to give him a free passage through their territories for attacking Travancore, but the Dutch made excuses. Travancore was not only their ally but the place from which the main portion of their trade came. They declared that they could not give free passage without permission from Batavia [capital of the Dutch East India Company].
Hyder decided to invade Travancore through Cochin. Sardar Khan with 10,000 men captured the fort of Trichur. Sardar Khan next captured the Dutch forts of Chettuva and Pappinivattom, however his further advance was checked by the Travancore lines, which passed through Cochin up to the fort of Cranganore.
Hyder's next few years were wasted in fruitless negotiations with the Dutch for a free passage through their territory to invade Travancore. The Dutch meanwhile assisted Rama Varma to strengthen the Travancore Lines otherwise known as Nedumkotta.
Thereafter Hyder was busy with his wars against the British and the Second Anglo-Mysore war (1780-1784) followed.
Rama Varma was meanwhile assisting Hyder's enemies to overthrow his power. In 1778, he gave a free passage to the British troops through Travancore for attacking the French settlement of Mahe, which was under Hyder's protection. During the second Anglo-Mysore war also the Raja rendered military aid to the British in their fight against Hyder Ali and Tipu Sultan. It was the assistance of the Raja's two battalions that saved Colonel Macleod from the desperate position at Ponnani, and later made it possible for him to penetrate to Bednore and thereby save Carnatic.
In view of these services to the Company Rama Varma was included as a friend and ally to the British in the Treaty of Mangalore.
Hyder Ali died in the midst of the Second Anglo-Mysore war in December 1782. His son Tipu Sultan successfully continued the war with the British. Hyder's Malabar possessions were restored to Tipu Sultan followed by the treaty of Mangalore which concluded the Second Anglo-Mysore war.
Relations Between Travancore and Mysore in the 18th Century By A. P. Ibrahim Kunju