
During the Third Anglo-Mysore War, British East India Company forces under Lord Cornwallis besieged Bengaluru and took the fort by storm in March 1791. A small surviving section of the fort, with its Delhi Gate, can still be seen near KR Market.
Tipu Sultan was killed defending Srirangapatna in 1799. The British then restored the Wodeyar dynasty to the throne of Mysore, under British oversight.
Further reading: Siege of Bangalore on Wikipedia.