Biden’s new challenge is to prepare allies for a protracted conflict in Ukraine.

When President Biden with their Western allies in Europe three months ago, the world rallied around Ukraine, and NATO suddenly had a new sense of purpose—its old goal of containing Russia. There was talk of “crippling sanctions”. President Vladimir V. Putin retreated, and talk of victory was in the air.

Now, Mr. Biden is back in Europe — for a Group of 7 summit of the world’s richest major democracies in the German Alps on Sunday and Monday, followed by a NATO meeting in Madrid — at a time when everything about war is getting tougher.

While Russia’s oil exports have plummeted, its revenues was on the rise, a function of soaring fuel prices. By concentrating its efforts in the south and east of Ukraine, Russia is making gradual but significant gains as the encircled Ukrainians begin to surrender key cities: first Mariupol, now in the east Severodonetsk.

So Mr. Biden must prepare his allies for a major conflict—a return to the “long, twilight struggle” that President John F. Kennedy spoke of during the Cold War—amid food and energy turmoil and inflation on a scale that few could imagine six times. months ago. Not surprisingly, some cracks are already showing as popular discontent, and the upcoming elections are starting to worry allied leaders.

White House officials say none of this will stop Mr. Trump. Biden to press even harder on Russia, and in the past few weeks there have been behind-the-scenes efforts to reach agreements on new ways to isolate Moscow.

The White House also plans to announce new steps to strengthen NATO’s capabilities, including a new “strategic concept” for the alliance, for the first time in a decade. Then there was still talk about Russia’s integration into Europe; today it seems fantastic.

The looming question will be how to deal with Mr. Putin at a time when Russia has gone from fellow European to pariah state. According to US officials, his isolation will deepen. But when French President Emmanuel Macron said in May that the West must resist the “temptation to humiliate” Mr. Putin was one of the first public signs of a split in the fundamental strategy of how far the Russian leader would go.

“Compared to the March trip, Biden is facing an increased degree of compromise between domestic and foreign policy goals,” said Richard Fontaine, executive director of the Center for a New American Security, a Washington-based research group. “His priority will be to increase pressure on Russia and help Ukraine, but to do so when the West is concerned about oil and food prices, its remaining stockpiles of weapons and a war with no end in sight.”

These two summits are different from those before, thanks to the new, violent nature of the conflict.

Just two months ago, the Americans were openly talking about defeating the Russians and the reasonable-sounding hope that Mr. Putin’s troops would be forced to retreat to the positions they held prior to the February events. 24 invasion. mr. Biden is now more cautious in his public tone, even if his goals remain fundamentally the same.

The question is whether he can begin to transition allies from crisis response to a sustained invasion response, knowing that costs will rise and pressure will mount as Mr. Trump mounts pressure. Putin is trying to use every means at his disposal — such as restricting gas exports and continuing to block Ukrainian grain exports — to influence his opponents.

mr. Biden aides say he is constantly weighing whether new weapons will escalate the war too quickly and give Mr. Putin another excuse for retaliation. But he also wants to make sure Mr. Putin is losing ground.