Lubmin is a picturesque resort on Germany’s Baltic Sea coast that boasts a long stretch of sandy beach bordered by soft dunes and a lush pine forest. Located a few hours north of Berlin, the town offers tourists a postcard version of seaside tranquility. Or it would, were it not for the fleet of excavator barges that sails out from the local port every day, and the large building site hiding behind the pines.

Both are part of a fiercely contentious project that has split Europe down the middle, and set Germany on a collision course with some of its closest allies. Out in the sea, the excavator barges are digging a massive underwater trench that runs in a straight line towards the building site on land. If all goes to plan, that trench will soon hold a pipeline filled with the most explosive commodity in European politics today: Russian gas.

The Nord Stream 2 pipeline has been in planning since 2015, and is due for completion in late 2019. Its defenders argue the project makes perfect commercial sense: the pipeline will connect the world’s biggest exporter of natural gas with the largest economy in Europe, doubling the capacity of the existing trans-Baltic link, Nord Stream 1, which has been operational since 2011. Together, the two pipelines will eventually be able to carry 110bn cubic meters a year of natural gas, enough to meet almost a quarter of total demand across the EU.

Critics regard the pipeline — and Germany’s role in it — as an act of betrayal and a geopolitical folly of the first order. Countries such as Poland and Ukraine have denounced it as a blatant attempt to marginalize their own gas pipelines — and a reckless move that will leave them and the rest of Europe at the mercy of Moscow. The European Commission is another opponent of Nord Stream, arguing the project undermines its push for greater energy independence and more diversified supplies.

The most formidable adversary, however, sits in Washington. President Donald Trump has made clear repeatedly that he wants to stop the €9.5bn ($11,071,775,000 US) project — and that he is ready to impose tough sanctions to achieve that goal. Last week, Mr. Trump launched a blistering attack on the new pipeline at the Nato summit in Brussels, warning that Germany had become “captive to Russia, because it’s getting so much of its energy from Russia."

Kirsten Westphal, an energy analyst at the German Institute for International and Security Affairs, likens Nord Stream 2 to an “onion” — you peel away layer after layer of controversy only to discover that the next one is more contentious still. At its core, however, the pipeline poses a simple but crucial question: should the west trust Russia or not?

“Russia’s annexation of Crimea in 2014 and the war in Ukraine have changed everything,” says Ms. Westphal. “For many people in the west, the idea that Russia is a dependable partner has gone. There is doubt: given all the geopolitical tensions, should we further expand our energy relationship with Russia? Should we make a bet, despite it all, to keep the channel open?”

For reasons of history as well as naked economic self-interest, that question tends to find a different answer in Germany than in other European countries and the US. It is summed up neatly by Axel Vogt, the mayor of Lubmin and — like most locals — an enthusiastic backer of Nord Stream. “For us, Russia has always been a reliable business partner. And we don’t see any sign that this is changing despite all that is happening on the big political stage,” he says. “For Lubmin, Nord Stream means jobs, it means contracts for local businesses and it means more business taxes,” the mayor says.

He adds that this affection for Russia goes beyond economic gain, and reflects ties forged in the time when Lubmin was part of communist East Germany. “Before reunification there was a very close relationship with Russia . . . and they want it to stay that way.”

For now the project enjoys the official support of the German government (as well as the unconditional backing of the Kremlin). But the chorus of critics in Berlin, including inside the government, is growing ever louder.

“Nord Stream 2 has divided the EU, and that cannot be in Germany’s national interest,” says Norbert Röttgen, a senior member of parliament for the ruling Christian Democratic Union. “The most important role that Germany has is to bring Europe together, not to divide it. But without Germany, this division would not exist.”

Earlier this year, German chancellor Angela Merkel signalled a subtle but important shift in official rhetoric. Nord Stream 2, she said, was “not just an economic project”. Political factors also had to be considered, she added, not least the need to preserve Ukraine’s status as a transit country for Russian gas. Kiev earns as much as $3bn in transit fees a year, according to Naftogaz, Ukraine’s state gas company, money the embattled government badly needs. The gas link also acts as motivation for the two countries to keep their military and political conflict from spinning out of control. When the gas stops flowing — as it did, briefly, in 2006 and 2009 — both sides stand to lose.

After meeting his US counterpart on Monday Vladimir Putin, Russia’s president said Moscow was willing to “extend this transit contract if the dispute between [Gazprom and Naftogaz] is settled."

Yet circumventing the Ukrainian network is precisely what Nord Stream is about, as Russian officials have made clear. The new pipeline will allow Russia to cut out the middleman for much of its westbound gas shipments — and to avoid the kind of disputes over payments and conditions with Kiev that have flared up in recent years. The fact that Ukraine’s pipelines are in urgent need of repair and investment provides an additional incentive.

For the Russian-European consortium that is bearing the cost of the project, Nord Stream 2 is, above all, a promising investment. Unlike Nord Stream 1, which was a genuine Russian-European joint venture, the new pipeline will be owned entirely by Gazprom, the Russian gas group that controls Russia’s pipeline exports. Half the financing, however, is provided by five European companies: Uniper and Wintershall of Germany, Austria’s OMV, Engie of France and Royal Dutch Shell.

Nord Stream’s backers are making a simple bet with potentially huge rewards. They know the pipeline will come on stream in 2019 just as supplies of European gas from the North Sea are starting to dwindle. The consortium estimates that even if overall gas demand is stable or declines slightly over the coming two decades, Europe will have to find an additional 120bn cubic metres a year of natural gas by 2035. That gap will be filled by shipping large volumes of liquefied natural gas from countries such as Qatar and the US, or through pipelines from Russia.

The looming gas shortfall has sparked a rush to build infrastructure, as suppliers jostle for position. Not far from Lubmin, on the other side of the Polish border, stands one of several new LNG terminals that have popped up on Europe’s coastline in recent years. Most are working well below capacity, reflecting the fact that pipeline gas is as much as 25 per cent cheaper than LNG.

Some German business leaders and officials suspect that this is one of the core reasons for the opposition to Nord Stream 2. The US, they say, is simply trying to boost the commercial prospects of LNG. That was the central complaint in an open letter signed by a cross-party alliance of senior German lawmakers earlier this year.

“It is not the job of the EU to keep potential competitors off the backs of US companies that want to market their . . . natural gas in Europe,” it said. “American liquid gas is welcome on the European gas market, but it has to face the competition just like others.”

Why should German and European consumers and companies pay a premium for non-Russian gas? The obvious answer, say critics, is politics. Moscow, they argue, is engaged in a broad campaign to split the western alliance, destabilize European democracies and reassert Moscow’s influence in eastern Europe and the Baltics. One of the most potent weapons in that campaign is Russia’s control over energy resources — and Europe’s dependency on them. Concern over what might happen if Russia turns off the taps has weighed heavily on European minds for years. Nord Stream 2 will make those concerns even more acute.

“Last year, Germany received slightly more than 40 percent of its gas supplies from Gazprom. If we now double the capacity by way of Nord Stream 2, we will see another significant increase in supplies from Russia,” says Mr. Röttgen. “I believe this pushes us into a danger zone, both in terms of energy policy and foreign policy. We will lose some of our independence.”

There is, he adds, another consideration: “The whole Putin system rests on two pillars: the military and the export of energy resources. By stabilising that second pillar, Germany is also stabilising the Putin regime.”

Gazprom says that given that its newer gasfields are in Russia’s north-west, Nord Stream 2 will save 2,100km of transit compared with the Ukrainian route, and cut emissions by 61 per cent.

Russia has also warned that US threats against it are illegal. “We believe that any sanctions against companies involved in an international project would not be legal,” Mr. Putin’s spokesman Dmitry Peskov said this month. “This is an exclusively international, commercial project devoid of any political motives, based on the principles of commercial gain for the countries that participate in it.”

The geopolitical case against Nord Stream 2 is made with particular intensity in eastern European capitals such as Warsaw, where fears over a Russian-German carve-up have a strong historical resonance. That sentiment was expressed in blunt terms by Radoslav Sikorski, the former Polish foreign minister, who likened the Nord Stream project to the 1939 deal between Hitler and Stalin to divide eastern Europe.

In Berlin, however, officials prefer to point to a different historical antecedent: the Ostpolitik of Willy Brandt, the German chancellor who pushed for rapprochement with the Soviet bloc in the late 1960s and early 1970s. In economic terms, the policy gave rise to a “gas-for-pipes” deal between West Germany and the Soviet Union. Against fierce US opposition, the Germans agreed to ship steel and pipes to the USSR, in exchange for natural gas imports.

The first Russian gas arrived in Germany in 1973, and imports rose steadily in the decades that followed, undisturbed by the cold war. For supporters of Nord Stream 2, that experience holds a crucial lesson. They see the gas relationship not as one of western dependence on Russia, but of mutual dependence between buyer and seller. Moscow needs western payments as much as the west needs Russian gas.

“I see Nord Stream as a stabilising factor for the relationship between Russia and the West,” says Matthias Platzeck, a former leader of Germany’s Social Democratic party and now the president of the German-Russian Forum, a Berlin-based association designed to foster bilateral ties. “Even at the high point of the cold war the Russians always delivered their gas. Why should that change now? After all, they need the money.”

As the political argument continues to rage, the project itself is making steady progress. Over the past two years, the consortium has amassed vast stockpiles of concrete-coated steel tubes, and deposited them at various points on the Baltic Sea. A few weeks from now, workers will begin welding the 12-metre-long pieces together at sea and lowering them into the water. With much of the investment already made, and all but one regulatory permit for the project granted, even critics admit that it will be hard to stop it now.

As long as the project does not hit fresh political and technical turbulence, Gazprom is planning to open the taps at the Russian end of the 1,200km long pipeline in late 2019. The impact at the other end, however, is already being felt.

“In commercial terms, there is a case to be made for Nord Stream 2,” says Ms. Westphal. “In political terms, however, it is clear that Germany will pay a heavy price.”

More from the Financial Times:

Ireland to become first country to divest from fossil fuels

EU court upholds UK Hinkley Point subsidies

Brussels launches investigation against Qatar Petroleum