An anti-submarine weapon (ASW) is any one of a number of devices that are intended to act against a submarine and its crew, to destroy (sink) the vessel or reduce its capability as a weapon of war. In its simplest sense, an anti-submarine weapon is usually a projectile, missile or bomb that is optimized to destroy submarines.
Prior to about 1890, naval weapons were only used against surface shipping. With the rise of the military submarine after this time, countermeasures were considered for use against them. The first submarine installation of torpedo tubes was in 1885 and the first ship was sunk by a submarine-launched torpedo in 1887. There were only two ways of countering the military submarine initially: ramming them or sinking them with gunfire. However, once they were submerged, they were largely immune until they had to surface again. By the start of the First World War there were nearly 300 submarines in service with another 80 in production.
World War I marked the first earnest conflict involving significant use of submarines and consequently marked the beginning of major efforts to counter that threat. In particular, the United Kingdom was desperate to defeat the U-Boat threat against British merchant shipping. When the bombs that it employed were found to be ineffective it began equipping its destroyers with simple depth charges that could be dropped into the water around a suspected submarine's location. During this period it was found that explosions of these charges were more efficient if the charges were set to explode below or above the submarine. However, many other techniques were used, including minefields, barrages and Q-ships and the use of cryptanalysis against intercepted radio messages. The airship ("blimp") was used to drop bombs but fixed-wing aircraft were mostly used for reconnaissance. However, the most effective countermeasure was the convoy. In 1918 U-boat losses became unbearably high. During the war a total of 178 U-boats were sunk, by the following causes: