Anglo-Mysore War IV: The very last battle of the series, Anglo-Mysore war III ended up with the "Treaty of Serirangapatam" keeping the two sons of Tipu Sultan as captives by the British Raj which was the only reason for the war of 1799 or we call the "Anglo-Mysore war IV".
To bring his children back from the grasp of Britishers the war was required, and to make that victory possible, Tipu Sultan merged with the French East India Company, Napoleon, and various other foreign alliances to fight alongside in the war.
Tipu Sultan also joined the "Jacobin Club" which seeks republic over monarch in France.
After all the preparations, Tipu Sultan was ready to fight on the battlefield with the Viceroy of India "Richard Wellesley, 1st Marquess Wellesley".
When Richard Wellesley noticed the planned attack, he came up with an idea to suppress the Mughals that took over the whole of India and made the British empire stronger to dominant than ever.
The idea was to pact every dynasty under a Subsidiary Alliance to avoid the attacks of the Mughals and other dynasties on the British empire.
Under this alliance, the army of each and every kingdom will be maintained by the Britishers and the rulers cannot have an army of their own. This was a tactic that dominated the British empire in India at that time.
The Nizam of Hyderabad was the first to accept the Subsidiary Alliance and Tipu Sultan said no to it which resulted in the war of 1799.
Even though Tipu Sultan was ready for the war, he ended up losing it as Wellesley attacked the kingdom of Mysore suddenly leaving no time for the reinforcements to come to save Mysore.
With this, the war ended up with the death of Tipu Sultan on 4th May 1799 and the Anglo-Mysore series was put to an end with the end of the Mughal empire in Mysore.
The kingdom was then given to Krishna Raja Wadiyar III oF the Wadiyar dynasty and he also signed the Subsidiary Alliance.