Russia pounded military targets throughout Ukraine on Saturday, in apparent retaliation for the sinking of an important naval ship and in preparation for an offensive in the Donbas region of the country’s east.

Russia’s Defense Ministry said Saturday the strikes had destroyed workshops in a tank factory in Kyiv and a military hardware repair facility in Mykolaiv, in southern Ukraine. Also targeted was the Ukrainian military factory on the outskirts of Kyiv, called Vizar, that produced the Neptune anti-ship missile that sank the flagship vessel of Russia’s Black Sea fleet, the Moskva, in a major embarrassment for the Kremlin.

The coming battle in the east will be fought largely on open terrain offering far fewer havens for Ukrainian fighters to hide while launching attacks on Russian armored vehicles, as they did so successfully in repelling the Russian forces from around Kyiv. The Russian missile attacks on Friday into Saturday seemed calibrated to weaken Ukraine’s ability to withstand armored assaults in that setting.

Credit…Tyler Hicks/The New York Times

The strikes served as a reminder that wherever the fighting is concentrated on the ground, Russia still can and will strike anywhere in Ukraine, and they underscored the importance of Ukraine’s industrial capacity, including its ability to make and repair weapons.

Why Russia waited until two months into the war to target these facilities is unclear. While the strikes could have been a response to the sinking of the Moskva, Russia’s Defense Ministry has not acknowledged that Ukrainian missiles hit the ship, which it says was mortally wounded by a fire and ammunition explosion.

Some analysts have pointed to the recent appointment of a top Russian battlefield commander in Ukraine, Gen. Aleksandr V. Dvornikov, as a factor in Moscow’s strategy. He is expected to address the lack of coordination and planning that has hampered Russian forces so far, reorganizing and redirecting them for the fighting in Donbas.

The rocket and missile attacks on Saturday also rained down on an airport in central Ukraine, the Black Sea port of Odesa, the northeastern city of Kharkiv and the western city of Lviv. Explosions from at least one strike shook Kyiv, the capital, and Ukraine’s air defense force said it had shot down a volley of four cruise missiles in flight elsewhere in the country.

Moscow retaliated diplomatically against the West on Saturday, barring Prime Minister Boris Johnson and other senior British officials from entering the country over their support for Ukraine, the Russian Foreign Ministry said. Mr. Johnson has been a leading voice in Europe against Moscow, and even traveled to Kyiv a week ago to meet with Ukraine’s president, Volodymyr Zelensky.

Britain has supplied Ukraine with new anti-ship missile systems, armored vehicles and other military equipment. Ukrainian fighters have used lightweight anti-tank weapons supplied by Britain to devastating effect against Russia’s armored vehicles.

Credit…Fadel Senna/Agence France-Presse — Getty Images

In Germany, the economy minister called on people to cut back their energy consumption, including by drawing curtains and lowering the temperature in their homes, as part of what he described as a national effort to reduce dependence on Russian fossil fuels in response to its invasion of Ukraine. Germany has joined other Western nations in imposing embargoes on Russian coal and possibly oil, but it is reluctant to do the same with Russian gas, which accounts for more than half its gas imports.

“We can only become more independent of Russian imports if we see it as a large joint project in which we all participate,” the minister, Robert Habeck, told the Funke media group on Friday. He added, in reference to President Vladimir V. Putin of Russia: “It’s easy on the wallet and annoys Putin.”

In the weeks since Ukrainian forces repelled the Russian attempt to seize Kyiv, residents have been streaming back into the city. But the window-rattling blasts Saturday offered a stark reminder that the war is far from over, even far from the front.

Russia’s cruise missiles, the principal weapon in Saturday’s attacks, can strike over long distances at sites throughout the country. Through the day Saturday, air raid sirens wailed in Kyiv, and overnight the distant, dull thuds of air defense missiles exploding could be heard in the sky over the city.

“Our air defenses are working, our military is defending us, but all the same there were explosions,” in a southeastern district of the capital, Kyiv’s mayor, Vitali Klitschko, said in a statement on Telegram. The strike killed one person and wounded several others, he said.

In the statement, Mr. Klitschko said Kyiv remains a target for Russia despite the defeat of its ground assault force, which retreated hastily, leaving in its wake burned tanks, its own war dead and hundreds of civilian bodies lying on streets. Police said Friday they have so far found 900 bodies of civilians in the Kyiv region, the administrative district surrounding the capital.

Credit…David Guttenfelder for The New York Times

President Zelensky said in a late night address on Saturday that Russian forces had been expelled from nearly 1,000 villages, towns and cities of varying sizes across Ukraine. Most of the liberated communities lie in the northern parts of the country, and had suffered extensive damage to buildings and infrastructure during the monthlong Russian occupation.

Mr. Zelensky also acknowledged the Ukrainian army had lost as many as 3,000 troops in fighting to date, while insisting that Russian fatalities were far higher.

Elsewhere in Ukraine, the air defense force said it had shot down four cruise missiles flying toward Lviv, and that a missile had exploded in the air near Odesa. Also near Odesa, Ukraine shot down a Russian unmanned aerial drone as it was reconnoitering military sites, the local authorities said.

Later, Mr. Zelensky acknowledged that Russia seemed poised to take full control of Mariupol, a strategic southern port, with its troops controlling all but a small part of a besieged city they have reduced to ruins. In recent days, Russian forces have advanced to the city center, and the remaining Ukrainian troops, hunkered down in the sprawling Azovstal steel plant and in Mariupol’s port, are greatly outnumbered and desperately short of provisions.

“Nevertheless, our guys are heroically defending,” said Mr. Zelensky, speaking to Ukrainian media outlets. “We are grateful to them for that.”

Near Kirovograd in central Ukraine, Russian long-range rockets struck an airport Thursday night, according to a local mayor, who said there were dead and wounded after the attack but did not specify how many.

The cruise missile strikes in Kyiv have continued nearly daily through the war but often hitting targets in outlying areas, without causing much disruption to life in the city, which has been reviving. So far, missiles have not struck key government buildings, including the presidential office and Parliament — whether they were targeted but successfully shielded by Ukraine’s air defenses is not clear.

“The war goes on in Kyiv and we cannot relax,” said Galina Ostapenko, 72, a retired postal worker, who was walking in the yard of her apartment building a block or so from the site of the strike Saturday.

“What happened pains my heart,” she said of the explosion in her neighborhood. “I will teach my grandchildren to hate the Russians.”

Credit…Lynsey Addario for The New York Times

As Russia steps up its attacks on Ukrainian military targets, Washington has been speeding up efforts to supply Ukraine with advanced weapons and long-range artillery pieces in recent days. Russia warned Washington of “unpredictable consequences” if it continues to ship heavy arms to Ukraine.

The attacks with precision munitions came as Russia continued to move equipment and forces into position for a renewed offensive, which military analysts have warned could be both long and bloody.

The eastern front stretches over some 300 miles from Kharkiv in the north to Mariupol in the south and many of the people living in the region have fled as weeks of shelling have destroyed critical infrastructure, flattened homes and left scores dead.

The shelling has increased as Russia moves troops and equipment into position for a full-scale assault. Unlike the precision strikes on military targets in other parts of the country, the indiscriminate bombardments in the east are often directed against homes and infrastructure.

On Saturday, a Russian shell hit an oil refinery in the city of Lysychansk in the Luhansk region, setting off a large blaze, according to Serhiy Haidai, the regional governor. “Shelling continues in residential areas of Lysychansk, and locals are asked to remain in shelters,” he wrote in a message posted on social media.

In Kharkiv, where Russia is trying to keep Ukrainian forces tied up as its troops try to advance into areas further south, two people were killed and 18 others wounded when what appeared to be guided missiles slammed into a shopping center in the heart of the shattered city.

Credit…Tyler Hicks/The New York Times

In Dnipro, the local government said that a Russian missile had struck an abandoned poultry farm.

There were also reports from local and national Ukrainian officials of Russian rocket attacks on Poltava, Kirovohrad, Dnipropetrovsk and Mykolaiv.

Even as Ukrainians take stock of the devastation left in the wake of the Russian occupation across the north of their country, the situation in areas under Russian occupation remained grave.

Ukrainians also say that Russian forces are trying to cover up evidence of war crimes in places that they control, although witness accounts and statements to that effect from local officials have been impossible to verify as Russian forces have blocked access to outsiders.

Local residents have relayed reports of Russian soldiers exhuming the bodies of civilians buried in the yards of residential buildings in Mariupol, and forbidding people to bury or remove the bodies of the dead, according to a statement posted on the City Council’s Telegram channel. Local officials say that Russia is burning the bodies as part of an effort to hide the extent of the slaughter in the city.

Credit…Tyler Hicks/The New York Times

Andrew E. Kramer reported from Kyiv, Marc Santora from Krakow, Poland, and Matina Stevis-Gridneff from Brussels. Thomas Gibbons-Neff contributed reporting from Kharkiv, Ukraine.