With a pointed warning to Ukraine’s Western allies, Russia test-launched a new intercontinental missile on Wednesday, even as it unleashed a hail of bombs, artillery and missiles inside Ukraine in a drive to weaken Ukrainian defenses for a major ground offensive in the east.

The intensifying barrage, aimed at more than 1,100 targets, came as the Russian military made probing attacks along a 300-mile front line winding through Ukraine’s southeastern Donbas region, which the Kremlin has said will be the focus of the next phase of its war, and continued to build up and prepare a massive force there.

The new Sarmat intercontinental ballistic missile “will force all who are trying to threaten our country in the heat of frenzied, aggressive rhetoric to think twice,” President Vladimir V. Putin of Russia said in televised remarks, a clear reference to the United States and other nations that have aided Ukraine in the face of Russia’s eight-week-old invasion.

It is not yet clear if the missile, which Russia’s Defense Ministry said could carry multiple nuclear warheads and outwit defenses anywhere in the world, actually possesses game-changing capabilities. The ministry also acknowledged the missile is not yet ready for active deployment, and the United States said it had not been surprised by the launch.

But the test-firing and Mr. Putin’s comments fit neatly into a relentless Kremlin propaganda campaign — the only information many of his people ever see — presenting Russians not as aggressors but as victims of Western persecution, yet still powerful and unbowed.

In a televised appearance with a group of school children at the Kremlin, Mr. Putin repeated his lie that Ukraine was committing genocide against Russian speakers in Donbas, which had “forced, simply compelled Russia to start this military operation.”

Credit…Russian Defense Ministry

The rising death and destruction in Donbas, along with a critical scarcity of basic supplies and services, have been driving an exodus of staggering proportions in Ukraine, a country with a prewar population estimated at 43 million. The United Nations said the number of people who have left the country reached 5 million, in addition to more than 7 million who have fled or been forced from their homes but remain within Ukraine.

Russia rejected calls by the United Nations and others for a humanitarian cease-fire to allow civilians to evacuate safely and supplies to reach those who remain. At a U.N. Security Council meeting on Tuesday night, the Russian deputy ambassador, Dmitry Polyanskiy, said such pleas were “insincere, and in practice they merely point to an aspiration to provide Kyiv nationalists breathing room to regroup and receive more drones, more antitank missiles” and antiaircraft missiles.

Credit…Alexey Furman/Getty Images

In Finland, lawmakers began debating whether to join NATO — the latest example of the war backfiring against Russia’s goals. Mr. Putin sought to prevent Ukraine from ever joining the alliance, eliminate the country’s military and political independence, and sow divisions within NATO.

Instead, Finland and Sweden are edging toward abandoning their longstanding nonalignment, seeking NATO’s protection from an aggressive Russia. NATO is ramping up military spending and is more united than it has been in years, and Ukraine’s military has put up a surprisingly tough fight against the larger but often disorganized and demoralized invading force.

The Ukraine invasion also has left Russia ostracized financially and economically — punctuated Wednesday at a Group of 20 finance ministers meeting. Several participants, including Treasury Secretary Janet L. Yellen and Ukraine’s finance minister, Serhiy Marchenko, abruptly left in protest when Russia’s finance minister, Anton Siluanov, started to speak.

The United States and other NATO countries have funneled enormous quantities of arms to Ukraine, and increasingly those shipments include heavier, more sophisticated and longer-range weapons — large-caliber artillery, armored vehicles, antiaircraft missiles and spare parts for damaged aircraft — drawing ominous warnings from the Kremlin.

Even Germany has reversed a long-held prohibition on sending arms to a conflict zone and has beefed up its own military spending, but calls to go farther still and ship tanks to Ukraine have divided the government in Berlin.

Russia has falsely insisted since the invasion began on Feb. 24 that it was striking only military targets, but countless shattered, burned-out and flattened apartment blocks, stores, offices, houses and cars attest otherwise. In the Donbas town of Avdiivka, near the front lines, where Russian bombardment has caused a number of civilian deaths and injuries, and driven many of those who remain underground, just this week airstrikes destroyed a supermarket and an athletics store in the heart of town.

The extended shelling and bombing before sending large ground forces into battle reflect a change in Russian strategy from the early part of the war, when it tried and failed to seize major cities and other locations quickly.

A Russian ground offensive backed by air, land and sea bombardment continues to lay waste to the southeastern port of Mariupol, now a scene of destruction and casualties on a scale all but unknown in Europe since World War II. Ukrainian officials said 20,000 people there had been killed — a figure impossible to verify, with access to the world cut off and many bodies still uncollected — and about 120,000 of the city’s prewar population of more than 430,000 remain trapped in the ruins, with little access to food, water, power or heat.

Credit…Oleg Petrasyuk/EPA, via Shutterstock

Ukrainian officials said early on Wednesday that they had reached an agreement with Russian forces to allow children, women and the elderly to safely leave Mariupol, only to say later that the evacuation deal had fallen apart, like so many before it. “Due to the lack of control over their own military at the place, the occupiers were unable to ensure a proper cease-fire,” said Iryna Vereshchuk, Ukraine’s deputy prime minister.

Soldiers and civilians were holding out in a warren of underground bunkers beneath the sprawling Azovstal steel mill complex in the city, defying ultimatums to surrender, while Russian fire concentrated on that site.

“We are probably facing our last days, if not hours,” Serhiy Volyna, a commander from the 36th Separate Marine Brigade, said in a video on Facebook from the plant. “We appeal and plead to all world leaders to help us.”

He and other Ukrainians said that Russian forces had bombed a hospital at the Azovstal complex. “We are pulling people from the rubble,” Sviatoslav Palamar, another commander inside the steel mill, told Radio Liberty.

Azovstal employees say about 4,000 people took refuge beneath the mill early in the war, mostly plant workers and their family members, but many later left. Other civilians sought shelter inside the plant, fleeing the Russian advance and, according to Ukrainian officials, fearing capture and forced relocation to detention camps in Russia. For soldiers, Azovstal is the last redoubt in the city.

It is not clear how many people remain there. Mr. Volyna said that 500 of them were injured.

Credit…Alexander Ermochenko/Reuters

Russia has assembled 76 battalion tactical groups, each with as many as 1,000 soldiers, in southeastern Ukraine, up from 65 a few days ago, the Pentagon said, and about 22 more are just outside Ukraine, regrouping and gaining new equipment.

Military analysts say the flat landscape of Donbas — with fewer woods, hills and cities than the northern areas where Moscow’s forces were badly mauled — could favor the Russians.

The first-ever launch of Russia’s Sarmat missile made for the latest example of the Kremlin rattling its nuclear sabers in the face of hardened opposition from the United States and its allies. Earlier in the war, Mr. Putin ordered Russia’s nuclear forces to be put on a higher state of alert, and a top Russian official has spoken of placing nuclear weapons along the borders of the Baltic States.

American officials said those earlier steps had no apparent action behind their heated rhetoric, and required no response from the United States. They reacted similarly on Wednesday. The Pentagon and the White House both said Moscow had properly notified Washington in advance of the Sarmat test.

“Such testing is routine,” said John F. Kirby, the Pentagon spokesman. “It was not a surprise.”

Like many I.C.B.M.s operated by Russia, the United States and other nuclear powers, the Sarmat is made to carry multiple nuclear warheads, each aimed at a different target, delivered by “independent re-entry vehicles” that the missile releases high above the atmosphere, along with decoys, to evade missile defense systems.

Credit…Mikhail Klimentyev/Sputnik

In addition, Russian officials have said that those re-entry vehicles could be “hypersonic glide vehicles,” able to maneuver en route to their targets, making them even harder to stop. The Sarmat was one of the next generation of weapons Mr. Putin announced in 2018, describing them as impossible to defend against, but Western analysts have questioned whether the glide vehicles and other new technology exists yet, or will any time soon.

The missile, launched from the Plesetsk Cosmodrome in northwestern Russia, struck a target on the Kamchatka Peninsula, 3,500 miles to the east, the Russian Defense Ministry said.

Anton Troianovski reported from Hamburg, Germany, and Richard Pérez-Peña from New York. Reporting was contributed by Michael Schwirtz from Avdiivka, Ukraine, Steven Erlanger from Brussels, Marc Santora and Cora Engelbrecht from Krakow, Poland, Ivan Nechepurenko from Tblisi, Georgia, Johanna Lemola from Helsinki, Victoria Kim from Seoul, Erika Solomon from Berlin, Matthew Mpoke Bigg from London, Jesus Jiménez from New York, and Katie Rogers and Alan Rappeport from Washington.