Codebooks and Ghosted Sailors: The Story of U-505

The men in the water thought the Americans would shoot them. They had just scrambled off the sloping deck of a sinking U-boat, flinging themselves into the warm Atlantic swells as depth charges pounded the sea around them. Somewhere above, an escort carrier’s warplanes circled, and gray silhouettes of destroyer escorts knifed through the spray, guns still trained on the submarine that had been their quarry all morning. One of the Germans floated on his back, staring up at the sky, certain that if the enemy didn’t finish them, their own boat would: The charges they’d set would explode, the hull would roll, and U-505 would finally sink the way so many others had. Silently, taking all hands with it.


Instead, the American ships slowed.


On the bridge of USS Guadalcanal, Captain Daniel Gallery watched the crippled U-boat turn in a lazy circle, like a mortally wounded shark, her crew scattering in the water around her. The usual script in the Battle of the Atlantic called for one more salvo, one more spread of shells to make sure the submarine never came up again. However, Gallery had rehearsed something different. Months earlier, he’d quietly trained a small party of sailors for a job many in the Navy considered fanciful at best and suicidal at worst: boarding a live German U-boat at sea and taking her intact.


Now the chance he’d imagined was right there off his starboard bow.


A whaleboat from the destroyer escort USS Pillsbury sliced away from the formation, bucking in the U-boat’s wake. Packed into it were nine sailors led by a junior officer, Lieutenant (junior grade) Albert David, all wearing life jackets and steel helmets, some still shrugging into kapok vests as they went. They could see the German submarine up close now: the conning tower empty, the deck gun unmanned, the bow riding too high, suggesting flooding below. The U-boat was moving in a slow, mindless arc, propellers still turning, any one of several things ready to kill the men who tried to board her, from demolition charges set by the crew to the sea flooding through open hatches to a sudden plunge as the boat foundered beneath them.


David’s men came alongside and grabbed for anything they could hold.


For a moment, U-505 and the whaleboat rose and fell out of sync, steel and wood grinding together. Then, in a scramble of boots and hands, the Americans swung themselves onto the wet deck of the German submarine. The only sound was the slap of waves against the hull and the distant shouting of German survivors in the water. No one knew whether a wounded sailor was still aboard, whether a panicked officer had left a surprise wired to the control room, whether the boat had minutes or seconds before she dropped under for good.


Behind them, the Atlantic rolled on as if this were just one more skirmish in a long, grinding campaign. Ahead of them, inside the dark pressure hull of U-505, lay something far more valuable than a single kill: codebooks, machinery, and documents that could help the Allies read the enemy’s mail. Plus, a secret so important that, by nightfall, dozens of men would begin to vanish on paper.


Because in the summer of 1944, when the Allies seized this drifting U-boat alive, they did something almost unheard of in a war already full of brutal compromises. They not only captured an enemy ship, but they also tried to make it, and its crew, disappear.


The “Unluckiest” U-boat


Officially, sailors will probably insist they aren’t superstitious. Yet even in the ruthlessly practical world of the U-boat arm, certain hull numbers began to carry a weight of their own. U-505 was one of them.


She left the shipyard at Hamburg in 1941 as a Type IXC long-range submarine, the sort of boat designed to range far into the Atlantic and beyond, hunting freighters on the open sea. On paper, she was a modern weapon for a confident navy, entrusted to a capable first commander, Kapitänleutnant Axel Olaf Loewe. In practice, from her earliest patrols, U-505 behaved as if she were laboring under a private curse. She sank ships and harassed convoys, but she also limped home more battered than most of her sisters, carrying scars that shipyard workers in Lorient came to recognize before they read her number.


In the Caribbean, on her fourth war patrol in November 1942, a low-flying Allied Hudson bomber caught her on the surface and struck with unnerving precision. The blast twisted metal, tore away fittings, and left the deck splintered, forcing the crew into a desperate fight simply to keep the boat afloat. U-505 survived, just, but the price was months in dry dock and a spreading reputation: This was the boat that came back from patrol riddled with holes, the boat that absorbed more punishment than seemed reasonable. In a fleet where superstition rode quietly alongside doctrine, young sailors drew their own conclusions.


The worst day came not from an enemy but from within. On a later patrol, under her second commander, Peter Zschech, U-505 was pinned down under a withering depth-charge attack. Steel rang and groaned as explosions walked toward the hull. The crew braced for orders to dive deeper, to blow ballast, to ride out the storm. Instead, in the middle of that chaos, Zschech reportedly raised a pistol and shot himself in front of his men. It remains one of the only known cases of a U-boat captain dying by suicide while still in command. The watch officers and petty officers took over, fought the boat back to safety, and brought her home without him.


Stories like that cling. By the time Harald Lange assumed command, many in the U-boat service already regarded U-505 as unlucky, if not haunted—a boat that could not seem to complete a patrol without a disaster stalking her wake.


Yet there is an irony here that would not have been lost on the men who later walked her narrow passageways as prisoners of war. For all the talk of a curse, U-505 kept surviving when other U-boats did not. She endured bomb blasts, botched patrols, a commander’s suicide, and the tightening Allied noose in the Atlantic. And in the end, on that June morning in 1944 when she was supposed to die at last, she did something almost no one in the Battle of the Atlantic ever managed: She stayed afloat long enough for the enemy to climb aboard.


Gallery’s Hunter-killer Group


Captain Daniel Gallery did not set out to be just another convoy shepherd. In the middle years of the Battle of the Atlantic, the U.S. Navy began to experiment with something more aggressive than escorts that merely reacted to submarine reports. Gallery’s command, Task Group 22.3, was one of the results: a compact hunter-killer group built not to protect a single line of ships but to roam the ocean and hunt U-boats where they were thought to be hiding.


At the heart of this group was the escort carrier USS Guadalcanal, a stubby, utilitarian flat top whose flight deck launched stub-winged Avengers and Wildcats instead of glamorous fleet fighters. Around her moved a ring of lean destroyer escorts, ships with modest guns but excellent ears: sonar and radar sets that, when handled well, could peel back the cloak of darkness and weather that U-boats had relied on in the war’s early days. Each morning, Gallery’s officers gathered to study intelligence plots and radio-traffic analyses that hinted at where German submarines might be operating. The group would then fan out into those hunting grounds, carrying the fight to the enemy instead of waiting passively for torpedoes to strike.


Gallery had a reputation as imaginative, even a bit unorthodox, and his crew knew it. Long before U-505 surfaced in their path, he had drilled a small boarding and salvage party in the unlikely art of capturing a submarine intact. While most captains were content to drive a contact under and leave the rest to the sea, Gallery walked his men through the possibilities: What if a U-boat surfaced crippled? What if the crew abandoned ship in panic? Could they get aboard in time to grab something (e.g., codebooks, signal tables, cryptographic machinery) before scuttling charges did their work? For months, this plan existed in the gray area between contingency and fantasy, the sort of thing sailors joked about in the wardroom but practiced for anyway.


By 1944, hunter-killer groups like Gallery’s were the sharp end of an evolving Allied strategy. Improvements in radar, sonar, and air coverage had already blunted the worst of the U-boat threat, but these roving task groups added a new pressure: the knowledge that Allied ships might appear almost anywhere, chasing not just convoys but the submarines themselves. In that environment, a commander willing to gamble on boarding a live U-boat was an outlier, but he was also exactly the kind of officer the U.S. Navy wanted pursuing the dwindling U-bootwaffe (U-boat force).


Attack, Surfacing, and Boarding


By the first week of June 1944, the Atlantic was already humming with the machinery of invasion. Allied convoys were streaming toward England, warships were massing off French coasts, and in a quiet stretch of the sea off West Africa, a small American task group picked up the sound it had been listening for—the hollow, rhythmic beat of a diesel-electric submarine slipping through the depths.


The contact came like many others had for Task Group 22.3, first as a hint on sonar, then as a confirmed track. One of the destroyer escorts eased toward it, her hull shuddering as she maneuvered for position, the sonar team calling out bearings in clipped, practiced phrases. In the carrier’s flag plot, a grease pencil traced the U-boat’s estimated course across the chart, while Captain Daniel Gallery weighed his options. The routine answer was simple: Run over the contact and drop a pattern of depth charges heavy enough to smash steel and bone and send the submarine to the bottom of the Atlantic. But in Gallery’s mind, another thought had been waiting for months. If the U-boat came up alive, he would try to take her.

Depth charges dropped by U.S. Navy destroyer escorts explode near the German submarine U-505 in the Atlantic Ocean on 4 June 1944. (Photo: U.S. Navy)


The first depth charges thundered into the water, each explosion a blunt hammer swing against the unseen hull below. On board the German boat, the world turned into a shrieking, shaking metal tube. Pipes sprang leaks, fittings tore loose, and the pressure hull rang with the impacts as the Americans “walked” their pattern closer. In the control room, gauges jittered and the boat heeled as men grabbed for handholds and spun valves with bruised fingers. Captain Harald Lange had already been through too many brushes with disaster in U-505 to mistake this for a token attack. As the explosions grew nearer, he faced a brutal calculus: try to dive deeper and risk being crushed, or blow ballast and break for the surface, hoping the men would escape.


At last, with systems failing and the boat threatening to lose control altogether, the U-505 lurched upward. Compressed air roared into the ballast tanks. The deck tilted. Moments later, the submarine’s conning tower punched through the surface in a boil of white water, shedding spray and oil. To the Americans watching from the destroyer escorts, it looked like the classic “pop-up” of a damaged U-boat forced to choose air and light over a steel coffin.


What happened next broke the usual script. Instead of fighting it out on the surface with guns, Lange ordered his men to abandon ship. The conning tower hatch banged open, and figures spilled out, some pausing long enough to throw demolition charges or open critical valves meant to scuttle the boat. Others simply jumped, tumbling into the sea as machine guns on the American escorts tracked but did not fire. A single German sailor fell dead on the deck, cut down in the confusion; the rest thrashed in the water, expecting bullets that did not come.


From Guadalcanal’s bridge, Gallery saw an opening that might never come again. The U-boat, still circling under residual rudder and propeller, had been effectively deserted. No muzzle flashes streaked from her deck gun; no shapes moved in the conning tower. She was damaged and dangerous, but she was there. She was afloat, unmanned, and drifting within reach. Gallery gave the order he had rehearsed in his head: launch the boarding party.


A small boat from USS Pillsbury, one of the escort destroyers assigned to Tasker Group 22.3, sprinted across the choppy water, its bow slapping hard as it closed the distance. Lieutenant (junior grade) Albert David and his men checked their weapons and their gear one last time, and then fixed their eyes on the low, gray hull ahead. They knew almost nothing about the boat beyond her silhouette. They did not know whether charges had been set to blow her apart from the inside, whether sea water was already pouring through open vents, or whether some desperate German was still aboard with a grenade in his fist. What they did know was that if U-505 sank before they reached her, months of planning would go down with her. And she would take an irreplaceable trove of enemy secrets with her.


They came alongside in a tangle of spray and shouts. The U-boat’s hull loomed above them, slick with seawater and oil, still moving in a sluggish circle that threatened to grind wood and steel together. David picked his moment then hauled himself up, boots scrambling for purchase on the riveted plates. One by one, the boarding party followed, clambering onto the deck of a hostile submarine in the middle of a shooting war. For an instant, as they crouched there with the Atlantic surging around them and the boat rolling under their feet, the entire sweep of the Battle of the Atlantic narrowed to this: a handful of men standing on a captured U-boat that might, at any second, vanish beneath them.


They did not have time to savor the moment. Somewhere below their boots, the sea was already inside the U-505, pushing through opened valves and torn fittings. If the men from Gaudalcanal wanted to keep their prize and its secrets from sinking out of sight, they would have to fight the ocean itself, in the cramped, flooded compartments of a foreign ship.

A boarding party from the USS Pillsbury (DE-133) working to secure a tow line to the bow of the captured German submarine U-505, 4 June 1944. Note the large U.S. flag flying from the submarine’s periscope. (Photo: U.S. Navy/Naval History and Heritage Command)


The Real Prize: Codes and Technology


To the boarding party, U-505 first felt like a problem of water and steel. The boat was flooding, the engines were still turning, and the men from USS Pillsbury had to slam hatches, spin valves, and rip away demolition charges before the submarine either blew itself apart or slid under the surface. Only once they had wrestled her into a sullen, leaky equilibrium (still dangerous but no longer dying by the minute) did the second task begin— finding out what, exactly, they had just risked their lives to capture.


The orders were simple and urgent. Get everything that looked like paper or machinery of importance out of the boat and into American hands. Sailors grabbed armfuls of charts from the navigation spaces, tore cipher tables and signal books from their racks, and hauled up wooden boxes of documents that had been meant for the sea. Somewhere amid the clutter were the real prizes—current codebooks, keying schedules, call sign lists, and operating instructions that governed how the Kriegsmarine talked to its U-boats and how those U-boats talked back. In the cramped radio room and control spaces, the boarding party also found what Allied planners had hoped for but could never guarantee: two up-to-date Enigma cipher machines in working order, along with the wiring and plugboard settings that made them more than just impressive metal boxes.


For sailors fighting knee-deep in cold water, a codebook was just another bundle to be passed up the hatch and out onto the whaleboat. The significance of those bundles lay elsewhere in rooms on shore filled with mathematicians, linguists, and analysts who had spent years turning captured ciphers and radio traffic into something the fleet could use. Long before U-505 surfaced into the gunsights of Task Group 22.3, Allied codebreakers had been reading parts of Germany’s naval communications, but their access was never complete and never guaranteed. A sudden change in procedures, a new set of keys, or the loss of a critical hint could darken whole sections of the Atlantic. Every captured signal book, every scrap of authentic radio procedure, helped shore up that fragile advantage.


The submarine itself, once stabilized and towed to safety, offered its own kind of intelligence. Naval engineers crawled through U-505’s compartments, noting the layout of her machinery, the design of her torpedo rooms, the arrangement of her batteries and pumps, the details of her periscopes and hydrophones. Some of what they found confirmed what was already known from earlier captures and reconnaissance; some of it sharpened the U.S. Navy’s understanding of how German submarines had evolved since the early war years. Even small discoveries like a modified radar detector, a tweak to the snorkel system, and a different approach to damage control fittings could feed back into how Allied ships hunted U-boats or protected themselves against them.


There is a temptation in retelling the story of U-505 to suggest that it single-handedly transformed the code war in the Atlantic. The truth is more nuanced. By the summer of 1944, Allied intelligence already had powerful tools in place: direction-finding networks, pattern analysis, and years’ worth of accumulated decrypts. What made this capture so important was not that it started the process but that it threatened to end it. If the Kriegsmarine learned that a modern U-boat, complete with current ciphers and equipment, had fallen into enemy hands, prudence would demand a sweeping overhaul of codes and procedures. That, in turn, could blind the very systems that had guided Gallery’s hunter-killer group to U-505 in the first place.


Seen from that angle, the documents and devices pulled from the submarine’s damp interior were only half the story. The other half was less immediately tangible: the absence of any sign, for the rest of the war, that Germany understood what had happened. The value of U-505’s codebooks and Enigma machines were tightly bound to a brutal condition. The boat’s capture, and the continued existence of her crew, had to remain a secret.


Vanishing the Boat—and Its Crew


The first priority was to get U-505 away from prying eyes.


Once the submarine had been wrestled into grudging compliance, Task Group 22.3 turned toward a destination that made less sense on the map than it did in the minds of planners worried about secrets. Instead of hauling their prize into a well-known port where reporters, dockworkers, and curious officers might see her, the Americans steered for Bermuda. There, tucked away in a restricted anchorage far from the main theaters of war, U-505 could be studied by engineers and intelligence officers without anyone outside a small circle even knowing she was afloat.

USS Guadalcanal lying alongside the captured U-505. (Photo: U.S. Navy/Naval History and Heritage Command)

Keeping the submarine hidden was hard enough; hiding her crew required something more drastic. The men pulled from the Atlantic that June day, wet and shaken but alive, were initially held under tight guard. Then they were quietly shipped to the United States and delivered not to a famous East Coast installation but to a relatively obscure prisoner-of-war camp in northern Louisiana, Camp Ruston. On the maps and in official paperwork, Ruston looked like many other POW camps that had sprung up across the American interior, ringed with wire and guard towers. Inside, however, the U-505 contingent occupied a world of their own.


The German sailors from U-505 were housed in a separate compound, physically fenced off from other prisoners and subject to a different set of rules. Where most POWs could write letters home, receive parcels, and be accounted for under the routine inspections of the International Red Cross, the U-boat prisoners were effectively cut out of the system. Mail did not go in or out. Requests to inspect their quarters were ignored. To their families in Germany, they simply disappeared in the summer of 1944. Just one more crew from a U-boat listed as missing, presumed lost with all hands somewhere in the Atlantic.


From the American side, this was cold logic. If the Kriegsmarine learned that U-505’s men were alive in U.S. custody, it would not take long to connect that fact to the loss of their boat. And if Berlin concluded that a modern U-boat, complete with its cipher gear and operating documents, had been captured intact rather than destroyed, the only rational response would be to change everything: codes, procedures, perhaps even the structure of radio traffic on which Allied analysts had come to depend. For the sake of maintaining an invisible edge in the Battle of the Atlantic, a small group of prisoners had to vanish from the normal protections of war.


Life inside that fenced-off corner of Camp Ruston was not a concentration camp nightmare. By most accounts, the U-505 men were adequately fed, clothed, and housed. They worked, exercised, and formed the same small social structures that POWs everywhere tend to create. But they did so in a kind of legal and moral limbo, cut off from news of their families, unable to send even the brief, censored postcards that other prisoners relied on as proof of life. For them, the war’s end did not come with parades and proclamations; it came in slow rumors, in snatches of information filtered through guards, and only later in the formal notice that they would be going home.


It was not until after the guns fell silent in Europe that the secrecy around U-505 and her crew began to ease. The submarine herself had already been moved, examined by technicians and eyed by officers who saw in her both a defeated enemy and a useful model. The men who had once called her home were eventually repatriated, returned to a Germany very different from the one they had left. Some of them would later learn that, for years, their names had appeared nowhere on official prisoner lists, that their families had mourned them as dead while they hoed fields in Louisiana or walked the perimeter of a camp that did not officially exist for them.


In the balance sheet of war, the decision to make a boat and its crew disappear is easily justified—lives saved at sea, convoys that arrived because the enemy did not know its secrets had been compromised. But on the human scale, for those who kept pictures of their sailors on a mantel or for the children deprived of their fathers, U-505’s capture left a stranger kind of wake. It created a small pocket of men who survived the Atlantic only to spend the rest of the war as ghosts, alive and breathing but absent from the records their loved ones trusted.


From Secret War Trophy to Museum Ship


When the war ended, U-505 was no longer a secret that needed guarding but a problem to be disposed of. The U.S. Navy had squeezed what it could from the captured submarine. Engineers had traced her wiring, studied her pressure hull, tested her equipment, and measured her against the evolving standards of American undersea warfare. In a world suddenly flooded with surplus ships and scrap metal, an aging German U-boat looked less like a prize and more like so many tons of steel waiting for the cutter’s torch.


For years she lay at Portsmouth Naval Shipyard in New Hampshire, tied up and slowly rusting, her intelligence value spent and her future reduced to a line on a disposal list. There, among the shipyard’s quiet postwar rows of surplus vessels, the submarine that had once been too sensitive to mention risked vanishing in a far more mundane way: sold off, cut apart, and forgotten.


It might easily have gone that way if not for Daniel Gallery. The same officer who had schemed to capture U-505 alive now found himself campaigning to keep her that way. Gallery, a Chicago native, saw in the battered hull not only a symbol of a hard-won victory but also an opportunity for his hometown to host something unique: a real German U-boat that ordinary people could walk through. He wrote letters, lobbied civic leaders, and pushed the idea that U-505 could serve as both war memorial and teaching tool, a physical reminder of the long, mostly invisible battle that had kept the Atlantic lifeline open.


In 1954, after a complicated journey that included towing, river transit, and engineering contortions that would have amused any peacetime harbor pilot, U-505 arrived in Chicago. Workers hauled the submarine onto a prepared cradle outside the Griffin Museum of Science and Industry, where she settled into a shallow concrete trench as if into a man-made dry dock. For decades, visitors could walk around her hull in the open air and then clamber inside to see the claustrophobic passageways and machinery that had once prowled the Atlantic. Children who only knew World War II through newsreels and textbook photographs suddenly had something solid and cold to bang their knuckles against.


Time and Chicago weather took their toll on U-505, which was never meant to be left to the elements. Bowing to sentiment and a deep appreciation for historical artifacts, the Griffin Museum launched a massive restoration project, moving U-505 indoors to a specially built underground exhibit hall, and stabilized the structure for the long term.


Today, U-505 sits surrounded by displays about the Battle of the Atlantic, codebreaking, and the strange journey that took her from secret prize to public exhibit. For most visitors, she is a tangible connection to a war fought before they were born. For those who know the deeper story, there is another layer. This is not just any U-boat, but the one that was too valuable to mention, the one whose capture had to be kept so quiet that even its crew became living ghosts. In a sense, U-505’s final berth is ironic. The boat that was supposed to sink without a trace has instead become one of the most visible survivors of its kind—a steel ghost, brought up from the depths of secrecy into the bright, inquisitive light of memory.


This season, the Wright Museum of World War II is presenting a special exhibit, From Sails to Atoms: The Portsmouth Naval Shipyard, as part of our celebration of America’s 250th birthday. The U-505’s years at the shipyard, awaiting its final fate, are just one small part of the important role New Hampshire has played in shaping American history. Be sure to visit the museum during our 2026 season to learn more about the incredible history of the Portsmouth Naval Shipyard, where among other things you can step foot inside a recreation of a World War II-era submarine building process. The Wright Museum offers incredible opportunities to become immersed in the lessons and lives of the Greatest Generation.


Sources:
Griffin Museum of Science and Industry – “Capturing the U-505

Griffin Museum of Science and Industry – “U-505 Submarine” (main exhibit page)

H-Gram 064-3 – Close Quarters Antisubmarine Warfare (Part 3)

The National WWII Museum – “Louisiana Spotlight: U-505 and Camp Ruston

Naval History and Heritage Command – “Defeating the Sharks: The Capture of U-505

Naval History and Heritage Command – “Documents Captured on German Submarine U-505”

Perceptive Travel – “Secrets of the U-505 Submarine in Chicago’s Museum of Science and Industry

SOFREP – “The U-505: The Unluckiest U-boat of WWII

2025 Festival of Trees

Visit the Festival of Trees website to learn about this event.