The castle was rearmed at the beginning of the Second World War. Twin 6-pounder guns and longer range artillery were installed, zig-zag trenches dug for protection, and new buildings added across the site. The 16th-century fort was used as the headquarters of Falmouth Fire Command, which managed the artillery across the area. New radar-controlled, 6-inch (152 mm) Mark 24 guns followed in 1943. Falmouth played an important role in supporting the D-Day invasion of France in 1944, and during the preparations for the invasion, the gun batteries at Pendennis were used to defend against German E-boats. After the war, Pendennis was initially still used for training, but the castle was now obsolete and it was decommissioned in 1956.