Mysore was captured by the British after its four wars with Mysore (1767-69, 1780-84, 1790-92 and 1799).
Mysore became powerful under the rulers like Haidar Ali (1761-1782) and his son Tipu Sultan (1782-1799). Mysore controlled the profitable trade of the Malabar coast where the Company purchased pepper and cardamom.
In 1785, Tipu Sultan stopped the export of sandalwood, pepper and cardamom through the ports of his kingdom. He also disallowed local merchants from trading with the Company. He established a close relationship with the French traders and modernised his army with the help of the French.
These conditions led to the wars between the East India Company and Mysore kingdom. In the last battle, the Battle of Seringapatam, the Company ultimately won the war and Tipu Sultan was killed. As a result, Mysore was placed under Wodeyars dynasty and a subsidiary alliance was imposed.