In 1760 Hyder Ali, the General of the Mysore Army became the king of Mysore and ruled up to 1782. After his death, his son Tipu Sultan ruled from 1782 to 1799. He 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, and disallowed local merchants from trading with the Company. He also established a close relationship with the French in India and modernized his army with their help.
There were mainly three reasons for Anglo-Mysore conflict:
Due to these factors, the British were furious. Four wars were fought with Mysore (1767-69, 1780-84, 1790-92, and 1799). The Company forces were defeated by Hyder Ali and Tipu Sultan in several battles. Only in the last - the Battle of Seringapatam - did the company ultimately win a victory. Tipu Sultan was killed, Mysore was placed under the former ruling dynasty of the Wadeyars and a Subsidiary alliance was imposed on the state.
The fall of Tipu Sultan and the Sultanate of Mysore, during the Battle of Seringapatamin the year 1799.
The Marathas were subdued in a series of wars. In the first war that ended in 1782 with the Treaty of Salbai, there was no clear victor. The Second Anglo-Maratha War (1803-05) was fought on different fronts, resulting in the British gaining Orissa and the territories north of the Yamuna river including Agra and Delhi. Finally, the Third Anglo-Maratha War of 1817-19 crushed Maratha power. The Company now had complete control over the territories south of the Vindhyas.