WILHELMSHAVEN, Germany — When Russia invaded Ukraine in 2022, Germany realized that its dependence on natural gas piped from Russia had endangered its energy security. It had no ports to bring in alternative energy sources needed to keep its factories running and homes warm. Three years on, it now has four.

The most recent began operating in late May when a tanker called the Energy Endurance pulled in close to shore at the harbor town Wilhelmshaven and began unloading its cargo: liquefied natural gas from the Gulf Coast of the United States.

Watching from a dike was Marco Alverà, CEO of TES, a Dutch green energy company that helped construct the terminal, estimated to have cost $459 million, at the request of the German government, which now operates it.

“This is the icebreaker,” Alverà said.

Alverà and his colleagues have been eyeing Wilhelmshaven for years and initially planned to focus on importing a cleaner form of fuel made with renewable hydrogen to help the country meet its target of reaching climate neutrality by 2045.

But after Russia shut off much of the gas it had piped into Western Europe, Germany realized that even as it was building more wind turbines and solar farms, it also needed more sources of natural gas, which makes up about 20% of its energy needs.

The new Wilhelmshaven terminal is one of many European efforts to set up facilities for liquefied natural gas to lessen Russia’s leverage over the region. The appeal of LNG is that it can be brought from any country that has plants that can chill gas to a liquid state so it can be carried on special ships.

Since summer 2022, Europe has increased its capacity to receive LNG by about 30% a year, or 60 million metric tons, said Laura Page, an analyst at Kpler, a research firm. “Much of this increase has been in Germany,” Page said.

LNG made up about 40% of Europe’s gas supplies in 2024, nearly double from 2020. Close to half of the imports came from the United States.

Europe’s overall consumption of natural gas has been falling, but LNG fills many energy needs and can be purchased from diverse sources, which means reliance on it could increase in the coming years, especially if Brussels delivers on commitments to further reduce consumption of Russian gas, which still makes up nearly 20% of the bloc’s pipeline and LNG imports in 2024.

“LNG from non-Russian sources is expected to play an increasingly important role as a flexible and geographically diversified supply source,” said a recent study by the Agency for the Cooperation of Energy Regulators, a European energy agency.

TES, the Dutch company, agreed to help the German government build an LNG terminal. Like most recent additions, this one is centered on a leased vessel called the Excelsior that warms the frigid liquid to a gaseous state. Pipes from that terminal enter the national grid on a 360-acre property that the company wants to develop.

In Alverà’s plans, the existing terminal will eventually give way to a permanent energy complex connected to a jetty with docking space for six ships.

This hub, which Alverà hopes to gradually sell off to investors, would be capable of handling several times as much LNG as the floating vessel and, over time, would process the gas more cheaply.