Attack submarines may be either nuclear-powered or diesel-electric ("conventionally") powered. In the United States Navy naming system, and in the equivalent NATO system (STANAG 1166), nuclear-powered attack submarines are known as SSNs and their diesel-electric predecessors were SSKs. In the US Navy, SSNs are unofficially called "fast attacks".
In the action of 9 February 1945, HMS Venturer sank U-864 while both were at periscope depth. This was the first and so far only intentional sinking of a submerged submarine by a submerged submarine. U-864 was snorkeling, thus producing much noise for Venturers hydrophones (an early form of passive sonar) to detect, and Venturer was fortunate in having over 45 minutes to plot the U-boat's zig-zag course by observing the snorkel mast. Venturer's commander, James S. "Jimmy" Launders, was astute in assuming the U-boat would execute an "emergency deep" maneuver once it heard the torpedoes in the water, thus the "spread" of four torpedoes immediately available was aimed on that assumption. One hit, sinking the U-boat.
Following World War II, advanced German submarines, especially the Type XXI U-boat, became available to the Allies, particularly the United States Navy and the Soviet Navy. Initially, the Type XVII U-boat, with a Walter hydrogen peroxide-fueled gas turbine allowing high sustained underwater speed, was thought to be more developed than was actually the case, and was viewed as the submarine technology of the immediate future. However, the Type XXI, streamlined and with a high battery capacity for high submerged speed, was fully developed and became the basis for most non-nuclear submarine designs worldwide through the 1950s. In the US Navy, the Greater Underwater Propulsion Power Program (GUPPY) was developed to modernize World War II submarines along the lines of the Type XXI.
It was realized that the Soviet Union had acquired Type XXI and other advanced U-boats and would soon be putting their own equivalents into production. In 1948 the US Navy prepared estimates of the number of anti-submarine warfare (ASW)-capable submarines that would be needed to counter the hundreds of advanced Soviet submarines that were expected to be in service by 1960. Two scenarios were considered: a reasonable scenario assuming the Soviets would build to their existing force level of about 360 submarines, and a "nightmare" scenario projecting that the Soviets could build submarines as fast as the Germans had built U-boats, with a force level of 2,000 submarines. The projected US SSK force levels for these scenarios were 250 for the former and 970 for the latter. Additional anti-surface, guided missile, and radar picket submarines would also be needed. By comparison, the total US submarine force at the end of World War II, excluding obsolescent training submarines, was just over 200 boats.
A small submarine suitable for mass production was designed to meet the SSK requirement. This resulted in the three submarines of the K-1 class (later named the Barracuda class), which entered service in 1951. At 750 long tons (760 t) surfaced, they were considerably smaller than the 1,650 long tons (1,680 t) boats produced in World War II. They were equipped with an advanced passive sonar, the bow-mounted BQR-4, but had only four torpedo tubes. Initially, a sonar located around the conning tower was considered, but tests showed that bow-mounted sonar was much less affected by the submarine's own noise. While developing the purpose-built SSKs, consideration was given to converting World War II submarines into SSKs. The less-capable Gato class was chosen for this, as some of the deeper-diving Balao- and Tench-class boats were being upgraded as GUPPYs. Seven Gato-class boats were converted to SSKs in 1951-53. These had the bow-mounted BQR-4 sonar of the other SSKs, with four of the six bow torpedo tubes removed to make room for the sonar and its electronics. The four stern torpedo tubes were retained. Two diesel engines were removed, and the auxiliary machinery was relocated in their place and sound-isolated to reduce the submarine's own noise.