The three redoubts were nevertheless the key to the defence, and their loss demoralised most of Janssens's East Indian troops. Many Dutch troops also defected, repudiating their allegiance to the French. The British stormed the fort at midnight on 25 August, capturing it after a bitter fight. The siege cost the British 630 casualties. The defenders' casualties were heavier, but only those among officers were fully recorded. Forty of them were killed, sixty-three wounded and 230 captured, including two French generals. Nearly 5,000 men were captured, including three general officers, 34 field officers, 70 captains and 150 subaltern officers. 1,000 men were found dead in the fort, with more being killed in the subsequent pursuit. Janssens escaped to Buitenzorg with a few survivors from his army, but was forced to abandon the town when the British approached.