The Biden administration’s lamentable decision to stop blocking the Nord Stream 2 Russian-German gas pipeline emboldens the Kremlin, weakens Ukraine and Poland, dismays other allies, and rewards German greed and cynicism. Sloppy diplomacy in its communication adds insult to injury.

Yet amid the threnodies, history has an important, even consoling lesson.

On September 17th, 2009, the Obama administration abruptly shelved its planned missile-defense bases in the Czech Republic and Poland. The decision was defensible (the plans were flawed and what eventually replaced them is better). But the diplomacy was dreadful. The announcement was wrapped up in the gimmicky “reset” of U.S. relations with Russia. It was communicated brusquely to the Polish and Czech governments — on the anniversary of the Soviet invasion of Poland 70 years earlier. No Americans had noticed that. Everyone else did.

The next years were not remembered fondly in the region. Ill-fated gambits such as the “pivot to Asia” underlined feelings of neglect. The language gaffes continued too. The president spoke of “Polish death camps” and his aides liked to refer to allies as mere “partners”.

Yet by the end of Obama’s second term, U.S. allies in Europe were safer and stronger than they were when he took office: he had pushed NATO to adopt proper contingency plans for the defense of the Baltic states, and authorized a sharp increase in the U.S. military presence in Europe after Russia’s attack on Ukraine in 2014. It was maddeningly late and too small. But it was better than nothing.

Ukraine, Poland, the Baltic states, and other allies should bear this in mind as they digest the Biden administration’s biggest error to date. As with missile defense in 2009, the decision was defensible: given that Nord Stream 2 is 98% complete, it was probably futile to try to stop it. But the U.S. should have bargained far harder with Germany on behalf of friends and allies, notably Ukraine, which risks being the big loser from the loss of transit revenues. Instead, Germany provided paper promises and piffling amounts of money.

Ukraine is rightly furious (an invitation to President Volodymyr Zelensky to visit an empty Washington, DC in the dog-days of late August looks like a cynical snub). Adding insult to injury, American diplomats instructed their Ukrainian counterparts not to complain about the deal.

Petulance is tempting. But Ukraine’s decision to flirt with China makes things worse, not better. China’s interest is opportunistic. The West — for all its faults — wants Ukraine to succeed.

A better approach is to hold Germany to its promises to protect Ukraine. Another element is to realize Germany’s promised support for energy independence in the region and for the Three Seas Initiative (3SI). This aims to boost infrastructure connections between the Adriatic, Baltic, and the Black Sea but has languished under lackluster leadership. One aim should be to make Ukraine a full member in time for next year’s summit in Latvia. Another should be to establish a permanent secretariat, putting the 3SI on a proper legal, intergovernmental footing.  Exceeding expectations will not be difficult, sadly.

The big worry is that the Nord Stream decision heralds a general change in U.S. policy to Russia, perhaps reflecting the mistaken neo-Kissingerian belief that the Kremlin can be weaned away from its relationship with Beijing. Europeans must argue forcefully against that — and underline their words with deeds, showing that they can help the U.S. exert economic, military, and diplomatic pressure on the party-state.

The lesson is simple. Compared with an imaginary, perfect ally, the United States indeed is infuriatingly arrogant, inattentive, and dysfunctional. But even imperfect American leadership is better than its absence.