During World War II, it was the site of a major Italian fortification, invested by the XXIII Corps under the command of General Annibale Bergonzoli. On 21 June 1940, the town was bombarded by the 7th Cruiser Squadron of the Mediterranean Fleet. The bombardment force consisted of the , British cruisers and , the Australian cruiser , and the destroyers HMS "Dainty", "Decoy", "Hasty", and . However the bombardment is reported to have only caused minimal damage. The town was taken during Operation Compass by Commonwealth forces consisting mainly of the Australian 6th Division in fighting over 3–5 January 1941 at the Battle of Bardia.