As soon as WWII began, the British declared war on Germany and the Battle of the Atlantic began; it ended up being the longest battle of the Second World War. The war commenced in September 1939 and ended when Germany surrendered in May 1945. It pitted the Allied supply and merchant ships against Germany's aircraft, submarines, and surface vessels.
Outbreak of the Battle of the Atlantic
The outbreak of the war was unexpected by both sides. Germany had less than 50 U-boats while the British had even fewer ships to counter them. The Nazis began unrestricted submarine attacks on British ships, a strategy that nearly starved England to surrender. The U-boats attacked unescorted ships and caused massive losses at an alarming rate. Winston Churchill appealed for help from President Franklin Roosevelt, and although the US had chosen to be neutral, he offered 54 piper destroyers that were no longer in service. In turn, the British would allow the American to use their bases in the Caribbean. The US also began building ships for lease to the British.
America Joins The Battle
America joined the Battle of the Atlantic on December 7, 1941, after Japan unexpectedly attacked Pearl Harbor, a US naval base in Hawaii, and inflicted massive losses. Shortly after, Germany declared war on the US. The US had no experience dealing with the U-boats, and in the first months of 1942, the U-boats sank hundreds of ships along the coast of the United States. The US adopted the British system of escorting vessels, but an inadequate number of ships to do so meant that the Germans had the upper hand. 1942 was the worst year for the Allied forces in the Atlantic, with the U-boats sinking over 1,000 Allied ships. In 1943, the first American destroyer began the fight against the U-boats. Every month, seventeen more were sent to the frontline. Armed with improved electronic equipment including radar and HF/DF, the warships began the war against the U-boast. By May 1943, the Allied forces were sinking more Nazi ships than the Nazis were sinking Allied merchant ships. The Allied forces captured a U-boat, "U-505", and were able to access a working Enigma code machine. The machine allowed them to fully decode messages that they had only partially been able to do previously. Several other German boats were captured and their weapons and technology studied by the Allied forces, who then developed countermeasures against the weapons. Canada played a crucial role in ensuring Germany did not reach North America. The Royal Canadian Navy and Air Force filled the void left by the US as it dealt with Japan.
Aftermath of the War
After six years of fighting, Germany was overwhelmed and could no longer continue. In May 1945 the Nazis surrendered, bringing the war to an end. Roughly 2,700 Allied merchant ships had either been destroyed or sunk, with the U boats alone accounting for about half. The war resulted in the death of more than 130,000 Allied troops at sea. The entry of the Navy destroyer ships led to a drastic decline in the number of merchant ship sank. In 1944 one of the most technologically advanced ship at the time, the SLATER, entered the war. In the same year, it escorted more than 176 cargo ships across the Atlantic without losing a single ship. Of the 1,100 U-boats produced by Germany, 800 were sunk resulting in the death of 28,000 sailors.