Tipu Sultan followed Cornwallis' army, placing him in the awkward position of having an undefeated enemy army at his back while besieging the strong fortification. Tipu kept away hoping to take assault when underway in flank. Over the next twelve days, two companies of the Madras Pioneers provided sappers for eight batteries, dug several parallels and a trench up to the fort ditch. Cornwallis attacked secretly on the night of 21 March 1791. The Madras Pioneers, led by Lt Colin Mackenzie, crossed the ditch with scaling ladders, mounted the breach and entered the fort, while the artillery engaged the fort with blank ammunition. With a breach made, the main stormers rushed in and the fort was captured after a hand-to hand fight in which a thousand defenders were killed. Cornwallis captured the fort and secured the force against Tipu.