The writer is a contributing editor to The Post. His email is jim.hoagland@washpost.com.

Germany’s citizens and leaders have earned the world’s respect over the decades since World War II by repeatedly taking the moral and political high ground. From Willy Brandt’s imaginative Ostpolitik approach to relations with the Eastern bloc to the peaceful and effective reunification of their divided country in 1990, and on to Angela Merkel’s principled welcome of Syrian refugees in 2015, Germans have set standards that the rest of us have to admire.

So why in the world are they risking that hard-earned reputation for the sake of a seemingly corrupt gas pipeline deal with Russia’s Vladimir Putin — especially since the vast changes in the global energy markets of the past year have made the Russian deal obsolete, as well as damaging to European unity? And why is the Obama administration doing so little to discourage Chancellor Merkel from going along with Putin’s pipeline skulduggery?

This makes no sense. Putin’s objective is blatant. He intends to lock in revenue for his Gazprom corporation while deepening Western Europe’s dependence on Russian gas and strangling Ukraine’s ability to resist his faltering destabilization campaign there. And yet Merkel persists in describing the proposed Nord Stream 2 pipeline as “a commercial project” that makes market sense.

“But it doesn’t,” says Anders Aslund of the Atlantic Council. “Consumption of natural gas in the European Union has fallen by 21 percent over the past decade, and the existing Gazprom pipeline under the Baltic Sea is now operating at half capacity. And Gazprom is no ordinary state corporation. It pursues Russia’s geopolitical goals, cutting supplies or raising prices when the Kremlin wants.”

The views of Aslund, a Swedish economist with extensive experience in Russia and Ukraine, are bolstered by Gerhard Schroeder’s role as the head of the board of directors at Gazprom’s Nord Stream subsidiary. Schroeder signed the initial sweetheart deal with Putin for the Nord Stream 1 pipeline in 2005 shortly after his defeat by Merkel at the polls. It was in his final days as Germany’s chancellor that he began discussions with Putin about going on the Gazprom payroll, according to one source in a position to know.

And the surprise announcement in June by Gazprom of its intention to build yet another pipeline that bypasses Ukraine — which currently earns about $2 billion in transit revenue for Russian gas passing through its territory — is vigorously defended at every turn by the vice chancellor of Merkel’s coalition government, Sigmar Gabriel, a major figure in Schroeder’s Social Democratic Party.

Certainly by the standards Germany has developed to overcome its Nazi past and to protect its strong sense of social unity, this is tawdry stuff. It is not just about the money, of course. It is also about the geopolitics of placating Putin. And that suggests a surprising lack of solidarity by Germany toward its neighbors to the east.

In the two years I lived in Germany, I came to admire the German willingness to share the burden of hard times broadly across society. The willingness of German workers to restrain demands for wages and benefits helps explain why German unemployment today is half of that of France. The sacrifices made to absorb the former East Germany’s population on equal terms speak for themselves.

But Merkel’s failure to recognize an essential reality — for Putin, economics is war by other means — suggests that solidarity now seems to stop at Germany’s frontiers. And as Italy’s Matteo Renzi and other European Union leaders pointed out at the E.U. summit in Brussels two weeks ago, Nord Stream 2 would gravely undermine the E.U.’s efforts to form a common energy market that is pledged to move toward decarbonization.

It may be no coincidence that Gazprom’s escalation of pipeline positioning comes as Putin’s military campaign in the eastern part of Ukraine seems to be faltering. Putin has found it much harder to control the insurgent forces he has armed there than he apparently expected. One rebel leader, Igor Strelkov, has been quoted in Moscow as having criticized Putin for not helping his forces enough. Putin may sense that time is running out on his Ukrainian adventure and that he must either win or deal now.

U.S. law was recently changed to permit the export of oil, and the country has an abundance of low-cost natural gas. The administration should make clear that it will provide Ukraine with emergency energy supplies if need be. And President Obama, who is making a push to wrap up a new trans-Atlantic trade pact, should use his enhanced working relationship with Merkel to make sure that Germany lives up to its own high standards of behavior and solidarity with allies by abandoning a strategically dangerous pipeline.