President Biden on Saturday signed a new $40 billion military and humanitarian aid package for Ukraine as the country braced for a long war of attrition in its eastern regions, vowing he would not stop to fight until all Russian forces are expelled.

Yet on Saturday, Ukrainian President Volodymyr Zelensky acknowledged that ultimately the conflict would require a diplomatic solution, raising questions about what exactly that would mean.

Mr Zelensky said Russia had thwarted an early attempt to end the war through dialogue and now the conflict was “very difficult”. Speaking on the third anniversary of his inauguration as president, he said the war “will be bloody” but “the end will certainly be in diplomacy”.

Despite a recent series of setbacks and a shortage of manpower and equipment, Russia has continued its military campaign in eastern Ukraine and its propaganda offensive in the country, hours after claiming to have gained full control of the port city of Mariupol, in what would be its biggest gain since the start of the war.

Russia said in a statement late Friday that its Defense Minister Sergei K. Shoigu had informed President Vladimir V. Putin of the “complete liberation” of the Mariupol steel plant where Ukrainian fighters had made their last stand in the city before visiting lately. days. Ukrainian officials have not confirmed the Russian claim.

CreditAlexei Alexandrov/Associated Press

The Ukrainian military, for its part, said it had repelled 11 attacks in the provinces of Donetsk and Luhansk, collectively known as the Donbass region, the previous day and had destroyed eight tanks as well as other vehicles of Russian fights.

Overall, Zelensky said, Ukraine has “broken the backbone of the biggest or one of the strongest armies in the world”.

The war is now about to enter its fourth month, and while Moscow has been forced to withdraw first from outside the capital, Kyiv, and more recently from the country’s second largest city, Kharkiv, neither side is currently making more than incremental gains.

As the conflict moves ever closer to a stalemate and both sides fight in the Donbass region to gain the upper hand, calls for a ceasefire have grown, along with questions about what which would be a victory, or at least a fitting result, for Ukraine.

“A ceasefire must be achieved as soon as possible,” Italian Prime Minister Mario Draghi urged on Thursday, opening a parliamentary debate on Italy’s role in supporting Ukraine. He added that “we must bring Moscow to the negotiating table”.

German, French and Italian suggestions for a ceasefire were angrily and even bitterly dismissed by Kyiv as selfish and ill-timed. Ukrainian officials say Russia is hardly ready for serious peace talks and that their forces – despite huge losses in Donbass and Mariupol – have the momentum for war.

For now, some in Ukraine insist that the only outcome he will respect is the return of all territory lost by Russia since 1991, when it gained independence from the Soviet Union. This would include both Donbass in its entirety and Crimea, which Russia annexed in 2014. But Mr Zelensky hinted he would accept the pre-war status quo.

Credit…Lynsey Addario for The New York Times

Western diplomats argue that it is up to Ukraine to decide. But their unanimity begins to crumble when it comes to details.

On Friday, US Ambassador to NATO Julianne Smith, speaking at a conference in Warsaw, reaffirmed US strong support for Ukraine. “In terms of the end state,” she added, “we believe Ukraine will prevail, and we want it to protect its territorial integrity and sovereignty.”

But she added another goal: “We want to see a strategic defeat of Russia. We want to see Russia leave Ukraine.

For leaders in Eastern Europe and the Baltic, a lasting peace settlement and end to the conflict must include a landslide military victory that will end Mr. Putin’s presidency. Anything short of his departure would only pave the way for the next war, they say. They balk at suggestions from Berlin, Paris and Rome to bring Mr. Putin back to the negotiating table.

“Peace cannot be the ultimate goal,” Prime Minister Kaja Kallas of Estonia recently told The New York Times. “I only see a solution as a military victory that could end this once and for all, and also punish the aggressor for what he did.”

Otherwise, she says, “we’re back to where we started – you’ll have a break for a year, two years, then everything will continue”.

“All these events should wake us from our geopolitical slumber and bring us out of our illusions,” Polish Prime Minister Mateusz Morawiecki said Thursday at the Warsaw conference. “I hear there are attempts to allow Putin to somehow save face on the international stage. But how can you save something that has been completely disfigured?

Credit…Marcin Obara/EPA, via Shutterstock

“Russia can only be deterred by our unity, our military capabilities and our tough sanctions,” he added. “Not through phone calls and conversations with Putin.”

In a diplomatic salvo of its own, Russia’s Foreign Ministry on Saturday released a list of 963 people who would be banned for life from entering Russia, including Mr Biden, actor Morgan Freeman and New York columnist. York Times Bret Stephens. The department described its decision as a “necessary” retaliation against “hostile actions” by the United States.

Amid an ongoing debate about what a final settlement might look like, Russian and Ukrainian forces descended on the battlefield, aware that every military victory would turn into a diplomatic advantage.

Ukraine’s military said on Saturday that Russia was clearing the port of Mariupol in an attempt to get it working again. Reopening the port would strengthen Moscow’s control over the parts of southern and eastern Ukraine it controls, while increasing its economic influence in the Black Sea, where its navy is dominant.

And Russian forces entrenched themselves in areas outside the city of Kharkiv, presenting a formidable obstacle to any Ukrainian efforts to assert their advantage in this area.

The Russian military prepared on Saturday to attempt another pontoon crossing of a river in eastern Ukraine that provided a formidable barrier to its objectives in the region, the Ukrainian military said, despite the one of his deadliest engagements of the war in a previous attempt this month. .

Russian forces were again setting up bridging equipment near the Seversky Donets River, the Ukrainian military said in its regularly published morning war assessment. The creek’s winding path cuts through the heart of the region where Russian forces are battling Ukrainian defenders – around the cities of Izium, Sloviansk, Kramatorsk and Sievierodonetsk – creating major obstacles to Moscow’s offensive in eastern Ukraine.

Credit…Finbarr O’Reilly for The New York Times

“The enemy has not ceased offensive actions in the eastern area of ​​operations with the aim of establishing full control over the territory of the Donetsk and Luhansk regions,” according to the assessment.

The Ukrainian military blew up bridges to force the Russians to build pontoon bridges, a tactic that proved effective and costly for the Russian military. Military forces are particularly vulnerable to artillery strikes as they gather soldiers, armored vehicles and equipment when attempting to cross.

In the battle for control of the Donbass region, Russian forces attempted several pontoon crossings of the Seversky Donets, seen as an important tactical step towards the objective of encircling a pocket of Ukrainian troops in and around the city of Sievierodonetsk.

On May 11, Ukrainian artillery struck a pontoon with devastating effect, destroying the bridge, incinerating armored vehicles on both banks of the river and killing more than 400 soldiers, according to estimates by Western military analysts. The UK Ministry of Defense released statements corroborating Ukrainian accounts, based on satellite imagery and aerial drone footage posted online of the strike.

Whatever the end result of the war, no one expects it to end soon, because the leader of every country must be able to claim some sort of victory, especially Mr. Zelensky.

“For Zelensky, there is no other course than to keep fighting and reclaiming the territory they have lost,” said Germany-based foreign and defense policy analyst Andrew A. Michta. “The minute he accepts a compromise, given the bloodshed, he loses his political credibility. The Ukrainians cannot make a fair deal to stop the fighting, so it will be a long and drawn out war.

Steven Erlanger reported from Brussels, Andrew E. Kramer from Dnipro, Ukraine, and Katrin Bennhold from Berlin. Anton Troyanovsky contributed reporting from Istanbul.