During World War II, U-boat warfare was the major component of the Battle of the Atlantic, which lasted the duration of the war. Germany had the largest submarine fleet of the revived German War Navy(Kriegsmarine) since 1935 into World War II (1939-1945), since the Armistice of November 11th, 1918, scuttled most of the old Imperial German Navy from the First World War and the following Treaty of Versailles of 1919, had limited the surface navy of Germany's new Weimar Republic to only six battleships (of less than 10,000 tons each), six cruisers, and 12 destroyers. British Prime Minister Winston Churchill later wrote "The only thing that really frightened me during the war was the U-boat peril."
In the early stages of the war the U-boats were extremely effective in destroying Allied shipping due to the large gap in mid-Atlantic air cover. Cross-Atlantic trade in war supplies and food was extensive and critical for Britain's survival. The continuous action surrounding British shipping became known as the Battle of the Atlantic, as the British developed technical defences such as ASDIC and radar, and the German U-boats responded by hunting in what were called "wolfpacks" where multiple submarines would stay close together, making it easier for them to sink a specific target. Britain's vulnerable shipping situation existed until 1942, when the tides changed as the U.S. merchant marine and Navy entered the war, drastically increasing the amount of tonnage of supplies sent across the Atlantic. The combination of increased tonnage and increased naval protection of shipping convoys made it much more difficult for U-boats to make a significant dent in British shipping. Once the United States entered the war, U-boats ranged from the Atlantic coast of the United States and Canada to the Gulf of Mexico, and from the Arctic to the west and southern African coasts and even as far east as Penang. The U.S. military engaged in various tactics against German incursions in the Americas; these included military surveillance of foreign nations in Latin America, particularly in the Caribbean, to deter any local governments from supplying German U-boats.
Because speed and range were severely limited underwater while running on battery power, U-boats were required to spend most of their time surfaced running on diesel engines, diving only when attacked or for rare daytime torpedo strikes. The more ship-like hull design reflects the fact that these were primarily surface vessels that could submerge when necessary. This contrasts with the cylindrical profile of modern nuclear submarines, which are more hydrodynamic underwater (where they spend the majority of their time), but less stable on the surface. While U-boats were faster on the surface than submerged, the opposite is generally true of modern submarines. The most common U-boat attack during the early years of the war was conducted on the surface and at night. This period, before the Allied forces developed truly effective antisubmarine warfare tactics, which included convoys, was referred to by German submariners as "die glückliche Zeit" or The First Happy Time