Reinhard Hardegen was credited with sinking or crippling around 20 merchant ships in Allied waters. (Heinrich Hoffmann/ullstein bild via Getty Images)

In the early weeks of January 1942, relying on an old World’s Fair guidebook to find his way, Reinhard Hardegen brought his German U-boat near the mouth of New York Harbor. A Kapitänleutnant at the time, holding the equivalent rank of a lieutenant in the U.S. Navy, he was close enough to shore that, standing on his submarine’s bridge in the dark of night, he could watch the Ferris wheel turn above Coney Island, spot the headlights of cars and see the distant glow of skyscrapers in Manhattan.

“I cannot describe the feeling with words,” he later wrote in a memoir, “but it was unbelievably beautiful and great. . . . We were the first to be here, and for the first time in this war a German soldier looked out upon the coast of the U.S.A.”

That same night — by then, the morning of Jan. 15, 1942 — Lt. Hardegen and his crew fired torpedoes at the Coimbra, a British tanker ship carrying oil off the coast of Long Island. Thirty-six crew members were killed as the ship sank into the sea, its bow pointing out of the water like a buoy that, Lt. Hardegen declared, marked the way to New York City.

In two patrols along the East Coast, Lt. Hardegen — who went on to achieve the rank of lieutenant commander — sank about two dozen merchant ships, part of a German military campaign to sever the supply chain between the United States and Britain.

He became a hero in Germany, where Adolf Hitler personally awarded him the country’s highest military honor, but later disavowed any support for the Nazi party, became involved in German state politics and returned to the United States to speak with veterans groups and meet with the families of his wartime victims.

He was 105, and considered the last surviving captain of an Unterseeboot, when he died June 9, apparently in Germany. Christian Weber, president of the Bremen State Parliament in Germany, confirmed the death but did not provide additional information.

A onetime navy aviator, Cmdr. Hardegen joined the German submarine division after a plane crash left him with a shortened leg and chronically bleeding stomach. He had to conceal his injuries to enter the U-boat force, according to a 2009 account in the Virginian-Pilot, but soon rose to command a submarine that sank several vessels off the western coast of Africa.

In December 1941, days after the Japanese attack on Pearl Harbor, Germany declared war on the United States and began its U-boat campaign, dubbed Operation Drumbeat. Cmdr. Hardegen was given command of U-123, and on Jan. 12, 1942, about three weeks after departing from the German base in France, his submarine sank the British freighter Cyclops near Nova Scotia, killing 99 crew members.

It was the first of nearly 400 Allied ships sunk during the campaign, according to historian Michael Gannon’s book “Operation Drumbeat” (1990). The loss of supplies “constituted a greater strategic setback for the Allied war effort than did the defeat at Pearl Harbor,” he wrote, adding that for the United States, “in terms of raw resources and material . . . [it] constituted the costliest defeat of World War II.”

By Gannon’s count, about 5,000 people were killed by the U-boat attacks, which diminished in the second half of 1942 as merchant vessels began traveling in armed convoys, and as American forces utilized advanced radar and sonar technologies to hunt the submarines. Cmdr. Hardegen was credited by Gannon with sinking or crippling 19 ships; other sources credit him with downing about two dozen.

In the absence of mandatory blackouts, Cmdr. Hardegen was able to spend weeks at sea targeting tankers and freighters illuminated by the glow of city lights. He later told the Charlotte Observer that he was “very surprised” at the lack of maritime defenses — “no blackouts, no dimming, nothing” — and was among several German naval commanders to describe America’s Atlantic coast as a “shooting gallery.”

The waters off Cape Hatteras, in North Carolina, became known as “Torpedo Junction” for the U-boats that preyed there, and sailors’ bodies regularly washed up on shore. Cmdr. Hardegen, however, said he did his best to mitigate losses and assist survivors. In accounts that Gannon later corroborated, he said he approached one lifeboat to give the survivors buckets of food, along with a knife; on another occasion, he stopped a neutral Swiss ship and ordered it to pick up survivors from a sunken merchant vessel.

“Everyone stood at the railing, waved and wished us a good homecoming,” Cmdr. Hardegen wrote in his captain’s log. “Let’s hope that they tell this at home and effectively dampen the atrocity propaganda about us.”

While most U-boat attacks occurred miles away from shore and far from major cities, Cmdr. Hardegen terrorized the Florida coast on April 10, 1942, when he fired a torpedo into the SS Gulf­america in shallow waters off Jacksonville Beach. Within minutes, flames erupted from the tanker and residents ran to the beach.

Cmdr. Hardegen was close enough to see their faces, according to a subsequent account in the Orlando Sentinel, and positioned his submarine between the beach and the crippled ship to fire shells from his deck cannon, sinking the Gulfamerica. Nineteen crew members were killed, and civilians clambered aboard rowboats to rescue the survivors.

“All the vacationers had seen an impressive special performance at Roosevelt’s expense,” Cmdr. Hardegen wrote in his log. “A burning tanker, artillery fire, the silhouette of a U-boat, how often had all of that been seen in America?”

Cmdr. Hardegen recalled nearly being sunk by a destroyer near St. Augustine, Fla., but returned to Europe to fanfare from Hitler, who awarded him the Knight’s Cross with oak leaves and invited him to a private dinner.

“I said, ‘It would be better to have more air forces and submarines, and fewer tanks,’ ” Cmdr. Hardegen told the Atlanta Journal-Constitution in 1999. “He was angry. He said he knew better. I told him he looked too much to the land, and he didn’t like that.”

Cmdr. Hardegen said he was chided for his remarks but believed it was his duty to speak his mind. “I was not a Nazi,” he said. “I did my duty for my country, not for Hitler.”

The son of a high school teacher who wrote biographies of naval heroes, Reinhard Hardegen was born in Bremen on March 8, 1913. He entered the Navy in 1933 and became a submarine instructor in late 1942, after his meeting with Hitler. He later became chief of U-boat training and was transferred to command of an infantry unit near the close of the war.

Cmdr. Hardegen spent one year in British captivity during peacetime, apparently because of a mix-up with an SS officer who shared his last name, and eventually founded an oil company in Bremen. In a twist of fate, he briefly worked for Texaco, which owned one of the oil tankers he had damaged during the war.

For two decades, he also served in the Bremen State Parliament as a member of the Christian Democratic Union party. A complete list of survivors was not immediately available.

Cmdr. Hardegen made a well-publicized return to the United States after the publication of “Operation Drumbeat,” saying he wanted to “show Americans that the enemies of yesterday are friends of today.” His car — he reportedly drove until he was 100 — bore a license tag reading “U-123,” but he said he had otherwise moved far past military life.

“Now I sink putts,” he told the Journal-Constitution. “Not ships.”