The Anglo–Mysore Wars were a series of wars fought in over the last three decades of the 18th century between the Kingdom of Mysore on the one hand, and the British East India Company (represented chiefly by the Madras Presidency), and Maratha Confederacy and the Nizam of Hyderabad on the other. Hyder Ali and his successor Tipu Sultan fought a war on four fronts with the British attacking from the west, south and east, while the Marathas and the Nizam's forces attacked from the north. The fourth war resulted in the overthrow of the house of Hyder Ali and Tipu (who was killed in the final war, in 1799), and the dismantlement of Mysore to the benefit of the East India Company, which won and took control of much of India .
The First Anglo-Mysore War (1767–69) saw Hyder Ali gain some measure of success against the British, almost capturing Madras. The British convinced the Nizam of Hyderabad to attack Hyder, but the Nizam changed sides, supporting the Sultan. That was temporary however, and the Nizam signed a new treaty with the British in Feb. 1768. Hyder did contend with a British Bombay army attacking on the west and a Madras army attacking from the northeast. However, Hyder's attack towards Madras resulted in the Madras government suing for peace, and the resultant Treaty of Madras.
The Second Anglo-Mysore War (1780–84) witnessed bloodier battles with fortunes fluctuating between the contesting powers. Tipu defeated Baillie at the Battle of Pollilur in Sept. 1780, and Braithwaite at Kumbakonam in Feb. 1782, both of whom were taken prisoner to Seringapatam. This war saw the rise of Sir Eyre Coote, the British commander who defeated Hyder Ali at the Battle of Porto Novo and Arni. Tipu continued the war following his father's death. Finally, the war ended with the last British-Indian treaty with an Indian ruler on equal footing, the 11 March 1784 Treaty of Mangalore, which restored the status quo ante bellum. The Treaty of Gajendragad in April 1787 ended the conflict with the Marathas.