World War II: Battle of the Atlantic: German Grand Admiral Karl Dönitz orders the last U-boats to withdraw from their United States Atlantic coast positions in response to the effective American convoy system.

The Battle of the Atlantic, the longest continuous military campaign in World War II, ran from 1939 to the defeat of Nazi Germany in 1945, covering a major part of the naval history of World War II. At its core was the Allied naval blockade of Germany, announced the day after the declaration of war, and Germany's subsequent counter-blockade. The campaign peaked from mid-1940 through to the end of 1943.

The Battle of the Atlantic pitted U-boats and other warships of the German Kriegsmarine (Navy) and aircraft of the Luftwaffe (Air Force) against the Royal Navy, Royal Canadian Navy, United States Navy, and Allied merchant shipping. Convoys, coming mainly from North America and predominantly going to the United Kingdom and the Soviet Union, were protected for the most part by the British and Canadian navies and air forces. These forces were aided by ships and aircraft of the United States beginning September 13, 1941. The Germans were joined by submarines of the Italian Regia Marina (Royal Navy) after Germany's Axis ally Italy entered the war on June 10, 1940.

As a small island country, the United Kingdom was highly dependent on imported goods. Britain required more than a million tons of imported material per week in order to survive and fight. In essence, the Battle of the Atlantic involved a tonnage war: the Allied struggle to supply Britain and the Axis attempt to stem the flow of merchant shipping that enabled Britain to keep fighting. From 1942 onward the Axis also sought to prevent the build-up of Allied supplies and equipment in the British Isles in preparation for the invasion of occupied Europe. The defeat of the U-boat threat was a prerequisite for pushing back the Axis in Western Europe. The outcome of the battle was a strategic victory for the Allies—the German blockade failed—but at great cost: 3,500 merchant ships and 175 warships were sunk in the Atlantic for the loss of 783 U-boats (the majority of them Type VII submarines) and 47 German surface warships, including 4 battleships (Bismarck, Scharnhorst, Gneisenau, and Tirpitz), 9 cruisers, 7 raiders, and 27 destroyers. Of the U-boats, 519 were sunk by British, Canadian, or other allied forces, while 175 were destroyed by American forces; 15 were destroyed by the Soviets and 73 were scuttled by their crews before the end of the war for various reasons.The Battle of the Atlantic has been called the "longest, largest, and most complex" naval battle in history. The campaign started immediately after the European War began, during the so-called "Phoney War", and lasted more than five years, until the German surrender in May 1945. It involved thousands of ships in more than 100 convoy battles and perhaps 1,000 single-ship encounters, in a theatre covering millions of square miles of ocean. The situation changed constantly, with one side or the other gaining advantage, as participating countries surrendered, joined and even changed sides in the war, and as new weapons, tactics, counter-measures and equipment were developed by both sides. The Allies gradually gained the upper hand, overcoming German surface-raiders by the end of 1942 and defeating the U-boats by mid-1943, though losses due to U-boats continued until the war's end. British Prime Minister Winston Churchill later wrote "The only thing that really frightened me during the war was the U-boat peril. I was even more anxious about this battle than I had been about the glorious air fight called the 'Battle of Britain'."