OCRACOKE, N.C. — The sonar “target” first appears as a green and yellow streak on Randy Holt’s computer screen. Up ahead, nothing can yet be seen through the dark water 700 feet below the ocean surface.

Holt’s submersible, Nomad, glides over the sandy bottom, fighting the current and searching. With each sonar sweep, the image grows more distinct on the screen. “Very good,” Holt says. “We’re real close to this thing.”

Then he spots something outside and switches off the lights: “See the shadow?” A large black silhouette emerges from the gloom. “Yeah,” Holt says. “This is our U-boat.”

It’s the German submarine U-576, resting on its side, right where it sank in 1942. Its wooden deck plates have rotted away after 74 years underwater. But its hull, conning tower and deck gun — nicknamed “Peterle,” little Peter — are still there.

The encrusted hatches are all closed. And almost certainly entombed within are the skipper, Hans-Dieter Heinicke, and 44 German sailors, including one Herbert Sprissinger, who perished on his 20th birthday.

On Aug. 24, after a seven-year search, the National Oceanic and Atmospheric Administration (NOAA) got the first look at U-576 since the sub went down in a wild battle off North Carolina’s Outer Banks on July 15, 1942.

NOAA’s Office of Ocean Exploration and Research, along with the University of North Carolina’s Coastal Studies Institute and the federal Bureau of Ocean Energy Management, had been looking for the sub since 2009 in the area where the battle had taken place.

With the help of sonar and other devices, it was found in August 2014. One of the merchant ships it sank in the battle had been found nearby the year before.

But last month was the first time anyone had actually seen the sub since it was shelled and depth-charged to the bottom that Wednesday in 1942, eight months after the United States entered World War II.

In partnership with a marine research outfit called Project Baseline, the University of North Carolina Coastal Studies Institute and SRI International, scientists made a series of dives from the 146-foot vessel Baseline Explorer.

Operating from within the thick plastic bubble of two-person submersibles, they studied the wrecks of the U-boat and its victim, the Nicaraguan freighter Bluefields, which had a huge torpedo hole in its side. (The crew of the freighter survived.)

On one dive Thursday, a reporter went along.

The Unterseeboot 576 rests about 35 miles east of here, out in the Gulf Stream, where German subs savaged merchant shipping during the war, sinking scores of vessels and killing hundreds of people.

It’s in 721 feet of water, well below the “crush depth,” where the enormous pressure would collapse its inner hull, NOAA experts said.

It’s an eerie, lonely place. The seafloor is barren. And the few fish around the wreck have a sickly gray pallor.

Inside the 2¾ -inch-thick sphere of the submersible, the only sounds were the whirring of the carbon dioxide scrubber, the occasional hiss of air, and Holt’s voice as he radioed depth and bearing to the surface.

“It’s sort of unreal,” said NOAA maritime archaeologist Joe Hoyt, the chief investigator on the project, who was among the first to glimpse the boat on Aug. 24.

“I knew the story, [but] the moment that we get in there and it comes out of the gloom at you . . . it was humbling,” he said.

At that great depth, the boat remains substantially intact. “It’s all there, just as it went down in 1942,” he said.

“One of the things we’re looking for is what happened to the crew,” he said. “Did they try to get out the escape hatches? Did the ship flood catastrophically? Were they on the seabed for some period of time, disabled with air still in the sub?”

“All the hatches we were able to see . . . were dogged down, closed,” he said. “So, you see those hatches closed and the moment you kind of see that . . . you’re immediately aware that it’s a tomb.”

“There’s 45 guys inside of that thing,” he said. “And no matter the exact circumstances of their demise, it had to just be horrifying.”

‘A dangerous situation’

On the afternoon of July 15, 1942, Kapitänleutnant Heinicke had to make a crucial decision.

He was in a crippled, unlucky boat that had been damaged and nearly sunk by an aircraft attack a day or two before.

The attack had affected a ballast tank and hampered the boat’s ability to dive and surface. Heinicke had signaled his superiors that the boat could not be repaired.

“Under normal circumstances, that’s the end of the operation,” said retired National Archives expert and U-boat historian Timothy Mulligan. “If you can’t dive, or if you dive and you don’t know you’re going to come back to the surface . . . you’re in a dangerous situation.”

Heinicke was 29, the son of a German cavalry officer who had been killed on the Eastern Front in World War I. He was an experienced, observant commander who had been in the Navy for almost a decade.

He was on his fifth patrol with a year-old boat but had bagged only three ships and was plagued with engine trouble.

One of his victims, the armed British freighter Empire Spring, had gone down off Nova Scotia with all 55 hands aboard, according to the website Uboat.net.

Another, the Norwegian vessel Taborfjell, sank off Cape Cod so fast that only three of its 20-man crew survived.

But in the case of the American freighter Pipestone County, torpedoed off Cape Henry, Va., in April 1942, Heinicke surfaced near the lifeboats. He gave the survivors provisions and apologized for sinking the ship. There were no fatalities.

U-576 had a young crew. No one was older than 29, according to a crew list provided by NOAA. Seaman Egon Gablick was 18. Heinz Beckers, Kurt Bauer, Willi Steuer and Erwin Schlussler were 19.

The oldest on board was another kapitänleutnant, August Bohnenkamp, who would have turned 30 in November.

On the 29th day of the patrol, the damaged sub was headed east, perhaps toward home. Heinicke reported that he had made 16 miles, running on the surface in moderate seas.

“That’s the last communication,” Mulligan said.

At some point after that, the boat encountered an irresistible target.

It was an Allied convoy, designated KS-520 — 19 merchant ships and five escorts, bound from Hampton Roads, Va., to Key West, Fla.

Heinicke had spotted another convoy a few days earlier, but had lost contact with it.

He had also found one back in the spring, a group of seven troop transports. It was a potential feast for a U-boat. But he had been out of torpedoes and could do nothing.

Now he had to decide: Should he take the hobbled U-576 into battle or continue toward his home base in France?

“What does he do?” Mulligan said in a recent interview. “He tries to go after the convoy.”

Heinicke got into position and fired four torpedoes. Two hit and damaged the Chilore, an American freighter, according to NOAA. One hit and damaged the big Panamanian tanker J.A. Mowinckel, and the fourth sank the Bluefields.

But after firing the torpedoes, the U-boat inexplicably bobbed to the surface in the middle of the convoy. Patrolling airplanes and gunners on one of the convoy ships pounced.

The Navy seaplanes dropped depth charges, one of which slid off the sub’s hull before exploding, according to National Archives records Mulligan examined.

Three days later, German headquarters asked U-576 to report. There was no reply. Headquarters tried to reach the boat again on July 19 and again on July 21.

Nothing was heard.

‘Torpedo Junction’

Few people realize that desperate fighting raged just off the East Coast during World War II as U-boats torpedoed Allied shipping and U.S. forces fought back, NOAA said.

German subs sank 600 ships off the coast, often using the glow from U.S. towns to backlight their targets at night, according to historians.

The heavily traveled area off Cape Hatteras, N.C., was such a grim killing ground that it became known as “Torpedo Junction.”

It is what NOAA calls an oceanic battlefield. And the federal agency said it is working to determine exactly what happened there, just as historians would on a land battlefield.

NOAA is also considering expansion of its nearby Monitor National Marine Sanctuary, which protects the wreck of the famous Civil War vessel, to include the U-boat, the Bluefields and other historic shipwrecks in the area.

An estimated 90 vessels — including U-576 and three other subs — were sunk there between January and July 1942, NOAA said. And 1,600 men — 1,100 of them merchant seamen — were lost.

This week, the U-boat project had to be suspended because of bad weather, said David W. Alberg, supervisor of the Monitor sanctuary. He said the scientists hope to be back at the site this weekend.

The submarine is still technically the property of the German government, and the United States has agreed to care for it. NOAA’s aim is to conduct an underwater laser scan of both wrecks and produce exact 3-D models for posterity.

Last Thursday, as the submersible drifted through the dark water around the boat, Holt noted that the sub’s forward and aft dive planes were set as if the stricken vessel was struggling to surface.

It was one of the few outward clues to the sub’s end. There was also a patch of the outer hull that was peeled away near the front of the boat. Holt said that might be where a depth charge exploded, fatally weakening the structure.

It may have been that the crew sealed off flooded compartments but the boat was too heavy to rise, he said. “Maybe they just waited it out till the end,” he said.

An hour and a half after submerging, Nomad was cleared to ascend, and it slowly rose toward the surface and the sunlight, leaving U-576 behind in the dim underwater battlefield where it met its end.