WARSAW — President Biden delivered a forceful denunciation of Vladimir V. Putin’s invasion of Ukraine on Saturday, declaring “for God’s sake, this man cannot remain in power,” as he cast the war as the latest front in a decades-long battle between the forces of democracy and oppression.
Ending a three-day diplomatic trip to Europe with a fiery speech outside a centuries-old castle in Warsaw, Mr. Biden described the Russian invasion of Ukraine as the “test of all time” in a post-World War II struggle between democracy and autocracy, “between liberty and repression, between a rules-based order and one governed by brute force.”
“In this battle, we need to be cleareyed,” Mr. Biden said in front of a crowd waving Polish, Ukrainian and American flags. “This battle will not be won in days or months, either. We need to steel ourselves for the long fight ahead.”
Mr. Biden used the speech to bolster a key NATO ally on Ukraine’s western border that has served as a conduit for Western arms and has absorbed more than 2 million refugees fleeing the violence, more than any other country in Europe. And he sought to prepare the public, at home and abroad, for a grinding conflict that could drag on for weeks, months or longer.
Just hours before the event, missiles struck the western Ukrainian city of Lviv, about 50 miles from the Polish border, extending Russia’s monthlong assault on major cities and civilian populations — and undercutting Russian statements a day earlier suggesting Moscow might be scaling back its goals in the war.
While declaring that “the Russian people are not our enemy,” Mr. Biden unleashed an angry tirade against Mr. Putin’s claim that the invasion of Ukraine is intended to “de-Nazify” the country. Mr. Biden called that justification “a lie,” noting that President Volodymyr Zelensky of Ukraine is Jewish and that his father’s family was killed in the Holocaust.
“It’s just cynical,” Mr. Biden said. “He knows that. And it’s also obscene.”
It was not immediately clear whether Mr. Biden’s apparent call for the ouster of Mr. Putin was one of the off-the-cuff remarks for which he is known or a calculated jab, one of many in the speech. But it risks confirming Russia’s central propaganda claim that the West, and particularly the United States, is determined to destroy Russia.
The White House immediately sought to play down the remark. “The president’s point was that Putin cannot be allowed to exercise power over his neighbors or the region,” a White House official told reporters. “He was not discussing Putin’s power in Russia, or regime change.”
Dmitri S. Peskov, the Kremlin spokesman, said Mr. Putin’s fate was not in the hands of the American president. “It’s not for Biden to decide,” Mr. Peskov told reporters. “The president of Russia is elected by the Russians.”
Experts were divided on whether Mr. Biden’s remark was intended to signal he believed Mr. Putin should be ousted, a political escalation that could have consequences on the battlefield.
Richard Haass, the president of the Council on Foreign Relations, said in a tweet that the White House’s attempt to walk back the president’s comment was “unlikely to wash.”
“Putin will see it as confirmation of what he’s believed all along,” he wrote. “Bad lapse in discipline that runs risk of extending the scope and duration of the war.”
Mr. Biden’s statement that Mr. Putin could no longer remain in power could be perceived “as a call for regime change,” said Michal Baranowski, a senior fellow and director of the Warsaw office of the German Marshall Fund, a nonpartisan policy organization. But he said he did not read it that way, and that Mr. Putin was unlikely to, either. “I think just what President Biden was saying is, how can such a terrible person be ruling Russia?” said Mr. Baranowski. “In that context, I don’t think it will lead to any escalation with Russia.”
Earlier in the day, Mr. Biden stood shoulder-to-shoulder with the Polish president, Andrzej Duda, and assured him that the United States considered its support for NATO to be a “sacred obligation.”
“America’s ability to meet its role in other parts of the world rests upon a united Europe,” Mr. Biden said.
While Poland’s right-wing, populist government has been embraced by Washington and Brussels as a linchpin of Western security, it has provoked quarrels with both in the past. Mr. Duda, however, thanked Mr. Biden for his support, saying that Poland stood ready as a “serious partner, a credible partner.”
At a stadium in Warsaw, Mr. Biden met with Ukrainian refugees in his first personal encounter with some of the civilians ensnared in a catastrophic humanitarian crisis caused by weeks of indiscriminate Russian shelling of Ukrainian cities and towns.
After speaking with the refugees, including several from the city of Mariupol, which has been flattened by Russian shelling, Mr. Biden called Mr. Putin “a butcher.”
That comment also prompted a retort from Mr. Peskov, who told TASS, the Russian state-owned news agency, that “such personal insults narrow the window of opportunity” for bilateral relations with the Biden administration.
Mr. Biden also met with Ukrainian ministers in his first in-person meeting with the country’s top leaders since the Russian invasion began on Feb. 24, part of what American officials hoped would be a powerful display of the United States’ commitment to Ukrainian sovereignty.
“We did receive additional promises from the United States on how our defense cooperation will evolve,” Dmytro Kuleba, Ukraine’s foreign minister, told reporters, the Reuters news agency reported.
But Mr. Biden gave no indication that the United States was willing to budge from its previous rejection of Ukrainian requests to establish a no-fly zone over the country or to provide it with the MIG-29 warplanes that Poland offered some weeks ago.
As Mr. Biden visited Poland, two missiles struck Lviv, rattling residents who ran into underground shelters as smoke rose into the sky. Lviv’s mayor said a fuel storage facility was on fire, and a regional administrator said five people had been injured.
Although Russian missiles hit a warplane repair factory near Lviv on March 18, the city, which had 700,000 residents before many of them fled the war, has otherwise been spared the airstrikes and missile attacks that have hammered other Ukrainian population centers.
Mr. Biden ended his trip one day after a senior Russian general suggested that the Kremlin might be redefining its goals in the war by focusing less on seizing major cities and instead targeting the eastern Donbas region, where Russia-backed separatists have been fighting Ukrainian forces for eight years.
Mr. Biden’s administration was quietly exploring the implications of the statement by the Russian general, Sergei Rudskoi, which indicated that Mr. Putin might be looking for a way out of the brutal invasion he launched with confidence and bravado a month ago.
Western intelligence agencies have in recent weeks picked up chatter among senior Russian commanders about giving up the effort to take Kyiv, Ukraine’s capital, and other key areas in the north and west of the country, according to two people with access to the intelligence. Instead, the commanders have talked more narrowly of securing the Donbas region.
Military analysts have cautioned that General Rudskoi’s statement could be intended as misdirection while Russian forces regroup for a new offensive.
Only weeks ago, Mr. Putin threatened to fully absorb Ukraine, warning that, “The current leadership needs to understand that if they continue doing what they are doing, they risk the future of Ukrainian statehood.”
In the latest instance of nuclear saber-rattling, Dmitri A. Medvedev, the vice chairman of Russia’s Security Council, restated Moscow’s willingness to use nuclear weapons against the United States and Europe if its existence was threatened.
“No one wants war, especially given that nuclear war would be a threat to the existence of human civilization,” Mr. Medvedev told Russia’s state-run RIA Novosti news agency in excerpts from an interview published on Saturday.
Hoping to rally his country and encourage negotiations with Moscow, Mr. Zelensky said that the success of a Ukrainian counteroffensive that began two weeks ago was “leading the Russian leadership to a simple and logical idea: Talk is necessary.”
For the moment, large portions of Ukraine remain a battleground in what has increasingly come to resemble a bloody stalemate between the smaller Ukrainian army and Russian troops that have struggled with logistical problems.
On Saturday, Russian forces entered the small northern city of Slavutych, near the Chernobyl nuclear power plant, where they seized the hospital and briefly detained the mayor, a regional military official said.
In response, dozens of residents unfurled the Ukrainian flag in front of city hall and chanted, “glory to Ukraine,” prompting Russian troops to fire into the air and throw stun grenades, according to videos and the official, Oleksandr Pavliuk.
Michael D. Shear and David E. Sanger reported from Warsaw and Michael Levenson from New York. Reporting was contributed by Megan Specia from Krakow, Poland, Anton Troianovski from Istanbul, Valerie Hopkins from Lviv, Ukraine, Eric Schmitt from Washington and Apoorva Mandavilli from New York.