In the wake of the war in Ukraine, the port at Wilhelmshaven has emerged as a critical hub for German efforts to break the country’s dependence on Russian energy. It is there, on the North Sea coast, that officials would like to build a giant new terminal to import liquefied natural gas from other sources.

There is just one problem that has slowed the plans: the construction site is littered with bombs from previous wars.

History is never far below the surface in Germany. Residents are frequently evacuated — sometimes by the thousands — when unexploded munitions are discovered at construction sites and need to be defused. As Germany tries to shore up its energy independence, unexploded wartime munitions have set back the construction of new wind farms and natural gas terminals alike.

But the situation at Wilhelmshaven is particularly acute, serving as a costly reminder of how the relics of past conflicts can complicate efforts to respond to the current one.

Wilhelmshaven played a prominent role during World War II as the home of one of the German Navy’s largest bases. It was bombed repeatedly by the U.S. and British Royal Air Forces, and then at the end of the war, the Allied militaries used the port as a dumping ground for unused munitions.

“We found all kinds of ammunition: German ammunition, from the U.K., from the Netherlands, from France, all different types,” said Dieter Guldin, the chief operating officer of SeaTerra, a company that specializes in locating and clearing unexploded munitions. “You have one bomb from World War II, and then a bomb from World War I, and then a grenade from France. It’s all mixed up; whatever you ask for from the wide spectrum of the world wars, you’ll find it.”

Mr. Guldin said in an interview that he had never seen so many unexploded munitions littered across a single swathe of seafloor before. It is the result, he said, of fishermen and sailors dumping weapons indiscriminately in the harbor and sea, in an effort to earn more money from Allied forces who paid them by the load.

Before construction could begin on the new terminal, experts scoured the harbor, uncovering 150 to 200 unexploded bombs, grenades and mines.

The sheer amount of ordnance has made the careful choreography needed to find and dispose of the ammunition particularly challenging. The process started months ago, with experts combing the construction site with magnetometers. After identifying the munitions and determining whether they needed to be removed, trained divers were dispatch to lift them off the seafloor.

If it is deemed safe to transport the weapons, they are lifted onto a large truck and driven away, to be destroyed by regional bomb squads. But if the munitions are deemed too large to be transported, then they are moved to a nearby sandbar and detonated there.

At Wilhelmshaven, at least 30 bombs have been or will need to be destroyed on site, a process that involves attaching TNT to the weapon and using a remote system to detonate it.

In the North Sea alone, an estimated 1.3 million tons of unexploded munitions have been sunk into the waters, according to the local government office responsible for identifying and clearing weaponry.

It is a combination of weapons used in naval battles, unused aerial bombs dropped by Allied pilots on their way back to England, and unused German munitions dumped by Allied commanders after the war.

“Bombs, grenades, machine gun munitions — it’s everything,” said Matthias Brenner, a senior scientist at the Alfred Wegener Institute for Polar and Marine Research.

Dr. Brenner, who has studied the environmental impact of dumped World War II munitions in the North and Baltic Seas, said that Allied forces had also loaded chemical warfare agents onto ships after the war and sunk them off Germany’s north coast. The toxic chemical compounds have since been found in the tissues of nearby marine life including mussels and fish.

The prevalence of the undersea weapons first emerged as a major challenge to construction in 2013, when a German energy supplier’s plans to build an offshore wind farm on the North Sea were delayed by months. The special ship used to clear the munitions, Der Spiegel reported at the time, cost the supplier up to €200,000 — about $220,000 — per day.

Before the war, Germany was so reliant on pipeline gas from Russia that it had not even built the infrastructure needed to import liquefied natural gas, known as L.N.G. After it began, German officials moved quickly to set up gas terminals and floating L.N.G. storage tanks at Wilhelmshaven, casting aside the usual appetite for deliberation and bureaucratic processes.

When the port’s first terminal came online in December after just five months of construction, Chancellor Olaf Scholz boasted that it was “a new world record.”

But beginning construction on the new terminal will have to wait until the rest of the ammunition is cleared from the site, which may mean at least weeks of backlog.

And the irony is not lost on Mr. Guldin that as he clears decades-old bombs to make way for a new project accelerated by the war, another country is being blanketed by munitions.

“We’ve been trying to get the unexploded ordnance out for 80 years now,” Mr. Guldin said. “The amount that will need to be cleared in Ukraine once that war is over — it’s a disaster.”