structural:expansion
Final years (June 1943 – May 1945)

After the defeat on the North Atlantic convoy lanes, it became clear to Dönitz and Hitler that a new generation of U-boats was urgently needed. There was a program to develop Walter U-boats which achieved high underwater speeds with a revolutionary hydrogen peroxide air-independent propellant system, but this program faced many technical setbacks and these U-boats would not become available in time. Instead it was decided to modify these designs where the new propulsion system was replaced with much larger battery capacity for a conventional U-boat propulsion system, the Elektroboot types. Since the design was ready, it was hoped that by massproducing the U-boat in prefabricated sections, these new Type XXI oceangoing and coastal Type XXIII would become operational in the summer of 1944. In the meantime, as a stopgap measure until these elektroboote became available, the existing U-Boat designs were gradually equipped with a Schnorchel (snorkels), which allowed U-boats to run their diesel engines whilst submerged and recharge their batteries.

The U-boats left the North Atlantic convoy lanes and shifted their attacks to the American-Mediterranean convoys in the Central Atlantic. The Allies learned from this move through intelligence and anticipated by ordering three US Navy task Groups centred around the escort carriers Card, Bogue and Santee to the region. These escort carriers protected the convoys, but were not part of its close escort and were allowed to search and destroy U-boats and their supporting U-boat tankers on HF/DF bearings. Only 1 ship was lost, but the escort carriers sank 17 U-boats. After this defeat, Dönitz halted all wolfpack operations in the beginning of August until U-boats could be upgraded with better weapons and measures. At the same time the British were allowed to access the harbors at the Portuguese Azores Islands and to operate Allied military aircraft based in the Azores Islands, which closed the air gap in the Mid-Atlantic and made operations there equally hazardous. During this period (June - September 1943) coastal command kept up its Bay Offensive with operations Musketry, Seaslug and Percusion. By the first week of August 41 U-boats were sunk in the Bay of Biscay. The Bay offensive was intensified by sending escort and support groups into the Bay but these ships were finally driven off by German Dornier Do 217 aircraft armed with Henschel Hs 293 guided glide bomb, which claimed a number of victims.

In September 1943 Dönitz hoped to surprise the Allies by sending the Wolfpack Leuthen back to the North Atlantic convoy lanes. These U-boats were equipped with T5 "Zaunkönig" acoustic torpedoes, better anti-aircraft guns, a new "Wanze" radar detector and "Afrodite" radar decoys. In an adaptation of their wolfpack tactics, they were ordered first to attack convoy escorts with their acoustic torpedoes before attacking the merchants. The group achieved surprise and success in its first attack on convoys ONS 18 and ON 202, but all subsequent attacks were beaten off with heavy loss for the Germans. Other wolfpacks Rossbach, Schlieffen and Siegfried were formed and kept the new campaign going but could achieve little for heavy losses. Only eight ships of 56,000 tons and six warships had been sunk for the loss of 39 U-boats, a catastrophic loss ratio. In November Dönitz finally recognized wolfpack attacks were not viable anymore in the face of heavy convoy escort and dispersed his U-boats.

From January 1944 onwards, Dönitz tried to preserve his U-Boat strength in order to be able to repel an expected invasion in Both Norway and France. The number of patrols by his Atlantic U-boats fell from 41 in January to just 10 in May. However, since U-boats were still diverted to the Mediterranean or kept in reserve in Norway and since operational losses were high, the number of available U-boats in the Atlantic force sank in the same period from 121 to 89. Dönitz had hoped the elektroboote could pick up the offensive on the convoy lanes again in 1944 but the construction of these boats got delayed by shortages of skilled workers and Allied bombing on shipyards and U-boat engine factories. Only in April 1944 was the first type XXI launched and its submerged speed and diving depth proved to be inferior to the designed performance.

On D-Day Atlantic operations were suspended, all available 36 U-boats, later reinforced with another seven, were sent out to confront Operation Neptune. For the loss of thirteen of their own, these U-boats sank only eight of the 5,339 vessels participating in the invasion of Normandy. Air patrols made operations for U-boats not equipped with a schnorkel impossible and these had to be recalled. A further eleven schnorkel U-boats arrived from Norway in the second week of the invasion, but they sank only two ships for the loss of seven U-boats. With the Allied advance in France, the U-boat bases in Brest and Bordeaux were lost in August-September. The other three bases in Lorient, St-Nazaire and La Pallice were evacuated but remained in German hands until the end of the war. No operations could be mounted from these bases however, the remaining 30 U-boats were evacuated to Norway. Between 16 May and 1 November 72 U-boats were lost, whilst they could only sink twelve small warships and fourteen merchant ships for 60,000 tons.

Norway was too far away from the convoy lanes in order to organise group attacks by the schnorkel U-Boats. In order to keep up the offensive pending the arrival of the elektroboote, 68 patrols were organised from Norway towards British waters between July and December 1944. Only schnorkel Type VII U-boats could be used as Allied air superiority excluded continuous cruising on surface. Sixteen U-boats were lost. In the same period, seventeen of the longer range type IX U-boats were sent to Canada and the Azores. These U-boats had also schnorkels, and were equipped with new technology : they had new 'Fliege' and 'Mücke' radar detectors and a new ' Hohentwiel ' search radar. They sank six warships and nine merchants ships for the loss of seven U-boats.

In 1945 Dönitz continued with the same approach: type VII schnorkel U-boats mounted 113 patrols to British waters from Norway and Germany. Sixty-five U-boats were lost by the end of the war. Another nineteen type IX U-boats sailed for the Americas; these U-boats sank three small warships and three merchants for the loss of nine of their own. Of the much awaited elektroboote, only five Type XXIII coastal elektroboote made seven patrols in 1945 which sank five small freighters. Only one of the big type XXI elektroboote embarked upon a patrol before the end of the war but it did not see action. In the last month of the war, many U-boats fled the Baltic ports as they were overrun by the Russian army. Eight elektroboote and nine other U-boats were sunk by Allied aircraft as they fled towards bases in Norway.

The last actions in American waters took place on May 5–6, 1945, which saw the sinking of the steamer Black Point and the destruction of U-853 and U-881 in separate incidents. The last actions of the Battle of the Atlantic were on May 7–8. U-320 was the last U-boat sunk in action, by an RAF Catalina; while the Norwegian minesweeper NYMS 382 and the freighters Sneland I and Avondale Park were torpedoed in separate incidents, just hours before the German surrender.

At the war's end, 222 U-boats were scuttled by their crews. The remaining 174 U-boats, at sea or in port, were surrendered to the Allies. Most were destroyed in Operation Deadlight after the war, but some served in Allied navies. Six were in Japan at the time of the German surrender and were captured by the Japanese.