The northern kingdoms of Kerala, namely Chirakkal, Kottayam, Kadathanad, and Calicut, were annexed to 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 began during the reign of Rama Varma's uncle and predecessor, Marthanda Varma (r: 1729-1758). In 1754, when Hyder was the faujdar of Dindigul, Marthanda Varma requested his help to quell a rebellion in some newly conquered territories. Hyder readily offered his assistance, but when the rebel chiefs heard of Hyder's arrival, they were so intimidated that they submitted to the Raja. Consequently, the Raja informed Hyder that his services were no longer required. According to some records, Hyder demanded compensation, but Marthanda Varma refused to pay the expense, thus sparking a long-standing feud between Hyder and Travancore.
The Rajas of Travancore, Cochin and Cranganore [Kodungallur] were allies of the Dutch East India Company, and in response, Hyder Ali proposed a deal. He would spare Cochin on payment of an annual tribute of four lacs of rupees and eight elephants, and Travancore for fifteen lacs of rupees and thirty elephants. The Raja of Cochin accepted the agreement, but Rama Varma refused to become a tributary of Mysore, as 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. However, he offered a considerable sum of money [about twelve lacs of rupees] if Hyder would reinstate the Kolathiri [king of Chirakkal] and the Zamorin or Samoothiri [king of Kozhikode / Calicut] in their respective dominions.
Anticipating that Hyder's response would not be favorable, who was likely to attack Travancore in the near future, Rama Varma took steps to fortify the Travancore Lines and forged a close alliance with the British.
Before Hyder could launch an attack on Travancore, he received news of the Nizam and Marathas advancing on Mysore, prompting him to hasten to Srirangapatna in January 1767. This led to the First Anglo-Mysore War, which lasted from 1767 to 1769.
Rama Varma sought to reinstate all deposed rulers of Malabar on terms that were beneficial to him, with the ultimate goal of gaining control of the entire Malabar.
While Hyder was engaged in the First Anglo-Mysore War, the Nairs of Chirakkal, Kottayam, Kadathanad and Calicut, supported by auxiliaries from Travancore and with munitions supplied by the British at Tellichery, revolted and expelled Hyder's troops from many places. Finally, Hyder decided to come to an arrangement with these Malabar chiefs. In 1768-69, Madanna, Hyder's governor in Calicut, on orders from Hyder, relinquished Malabar (except Palakkad and Cannanore) in exchange for 1.2 million rupees.
In 1773, Hyder Ali returned to Malabar and reconquered it. The Raja of Cochin, recognizing Mysore's suzerainty, paid two lacs of rupees and a few elephants as tribute, while the Raja of Cranganore offered three lacs of rupees and two elephants.
Upon Hyder's approach, the Zamorin and other chiefs fled to Travancore, where Rama Varma provided them with shelter and incited them to rebel against Mysore. He also supplied them with the necessary funds to carry out their operations.
Hyder was determined to conquer Travancore when he learned of the rebellious activities of the Raja. He was convinced that as long as the Raja remained unsubdued, he would never feel secure in Malabar. In 1776, Hyder's army, led by his general Sardar Khan, marched to invade Travancore. However, the Dutch, who had established a stronghold at the northern frontier of Travancore, stood an obstacle to his progress.
Hyder demanded that the Dutch grant him a free passage through their territories for attacking Travancore, but the Dutch refused, citing Travancore's status as their ally and the source of the majority of their trade. They declared that they could not provide free passage without approval from Batavia, the capital of the Dutch East India Company. Despite Hyder's insistence, the Dutch remained steadfast in their refusal, unwilling to risk their relationship with Travancore.
Hyder decided to invade Travancore through Cochin. He dispatched Sardar Khan and his 10,000-strong army to capture the fort of Trichur. The mission was a success, and Khan went on to seize the Dutch forts of Chettuva and Pappinivattom. However, his further advance was checked by the Travancore Lines, which stretched from Cochin to the fort of Cranganore.
Hyder's next few years were squandered in futile negotiations with the Dutch for a free passage through their territory to invade Travancore. The Dutch, meanwhile, provided assistance to Rama Varma to fortify the Travancore Lines, also known as Nedumkotta. Afterwards, Hyder Ali was occupied with his battles against the British, leading to the Second Anglo-Mysore War from 1780 to 1784.
Rama Varma was meanwhile aiding Hyder's enemies in their efforts to overthrow his power. In 1778, he granted the British troops a free passage through Travancore to attack the French settlement of Mahe, which was under Hyder's protection. During the second Anglo-Mysore war, the Raja provided military assistance to the British in their fights against Hyder Ali and Tipu Sultan. His two battalions saved Colonel Macleod from a dire situation at Ponnani, and later enabled him to march to Bednore and thereby save the Carnatic.
In recognition of his services to the Company, Rama Varma was included as an ally of the British in the Treaty of Mangalore. After Hyder Ali's death in December 1782 during the Second Anglo-Mysore War, his son Tipu Sultan valiantly continued the fight against 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