The Two Rivals-Marathas & The Nizam
The Treaty of Mangalore carried the seeds of strife with the Marathas, because they were disappointed in their expectation of acting as the mediators and of recovering their losses in the North of Mysore. Tipu had emerged with enhanced prestige whom even the mighty English could not humble. This excited the jealousy of both the Martha's and the Nizam who fought a war with him for two years from 1785 to 1787. The Nizam was also not friendly towards Mysore ever since he had come to power in 1761. He regarded himself as the overlord of the entire south, and expected Haidar and Tipu to be his tributaries. As he was military imbecile he allied himself either with the Marathas or the English to distress the Mysore rulers. There was always a pro-British party at Hyderabad which dissuaded the Nizam from begin cordial to Tipu. In the war that followed Tipu had the upper hand despite the alliance of his two neighbors. The war came to an end in April 1787 by the Treaty of Gajendragadh by which he ceded Badami to the Marathas hoping to win their support against the English or at least to prevent them from joining the English.
Tipu was disappointed in his expectations. Far from joining him to remove the English from India, both of them, the Marathas and the Nizam joined the English in a powerful confederacy against Tipu in the Third Mysore war.
The allies struggled hard for nearly two years from 1790 to 1792.
Lord Cornwallis who had surrendered to the Americans at Saratoga in the new world assumed the command, and with great difficulty he was successful in a surprise night attack to enter into the island of Srirangapatna on 6th Feb. 1792. Tipu was made to make peace by surrendering half of his kingdom, and paying three crores has indemnity, apart from sending two of his sons as hostages to Madras. This was a serious blow to Tipu.