Bangalore fort was captured by the East India company armies under the command of company governor general, Charles Cornwallis, on 21 March 1791 during the Third Anglo-Mysore War and formed a centre for British resistance against Tipu Sultan, being incorporated into the British Indian Empire after Tipu Sultan was defeated and killed in the Fourth Anglo-Mysore War (1799). A prominent role was played by the Madras Sappers in the capture of the Fort and subsequent development of the cantonment and the city. Bangalore is the permanent home of this Indian Army regiment since the mid-nineteenth century.