[citation needed] The main deck gun was a dual-purpose weapon used to sink merchant shipping or shell shore targets, or defend the submarine on the surface from enemy aircraft and warships.
In addition, submarines carried many more gun rounds than torpedoes - ten or fewer during World War I, fired in spreads of multiple warheads to increase the likelihood of a successful hit.
An example of this approach was Lothar von Arnauld de la Perière, who used a deck gun or a dynamiting team on 171 of his 194 sinkings.
This design was found unworkable in trials because the submarine was required to surface to reload the gun, and problems arose when variable amounts of water entered the barrel prior to firing.
In the early part of World War II, German submarine commanders favored the deck gun for similar reasons as their World War I counterparts; the limited number of torpedoes that could be carried, the unreliability of torpedoes, and because their boats could only travel submerged at slow speed for short distances.
After the Royal Air Force modified their anti-submarine tactics which made it too dangerous for a submarine to stay on the surface to fight, the U-Flaks were converted back to standard U-boat armament configuration.
Japanese submarine cruisers used 14 cm/40 11th Year Type naval guns to shell California, British Columbia and Oregon during World War II.
Most US submarines started the war with a single 3-inch (76 mm)/50 caliber deck gun, adopted in the 1930s to discourage commanders from engaging heavily armed escorts.