After Russia’s invasion, Kyiv became a battleground for the soul of Ukraine.

In only five weeks one of Europe’s most lively capitals has become a place where residential apartment buildings can crumble under strikes at a moment’s notice, where street-by-street gunfights have raged in northwestern suburbs and where women are forced to give birth in underground makeshift shelters.

Now, comments by Russia’s deputy defense minister on Tuesday that Russia would sharply “reduce military activity” near Kyiv amid fragile peace talks in Istanbul, have led to very cautious optimism that President Vladimir V. Putin may have deviated from his earlier aim of seizing the capital. The comments followed recent indications from the Russian military that it wants to focus its military energies on consolidating gains in eastern Ukraine.

Russia’s initial attempts to overtake Kyiv have clearly stalled 34 days into its invasion in the face of determined resistance on the ground and in the air, but Western intelligence assessments warn that Russian forces still pose a significant threat to the city. The battle has been characterized by the bombardment of residential buildings, attempts to encircle the city and a fight to gain air superiority.

Ukrainian forces have, at least for the moment, pushed Russian forces into a defensive position in some of the hard-fought strategic suburbs near the capital.

Credit…Ivor Prickett for The New York Times
Credit…Ivor Prickett for The New York Times

On Monday, Ukrainian counterattacks around Kyiv pushed back Russian forces in Irpin, a fiercely contested suburb on the northwestern edge of the capital. Irpin’s mayor said that most Russian troops had retreated, though fighting continued in some districts. If Ukrainian soldiers can maintain control of Irpin, it would be strategically important to keeping their hold on Kyiv

“Our Irpin is liberated from Moscow’s evil,” Mayor Oleksandr Markushin of Irpin posted on Telegram on Monday. But the deputy police chief, Oleksandr Bogai, offered a more skeptical account in a telephone interview, noting that fighting continued even as most Russian troops appeared to have pulled back, and that the Russians continued to shell the town.

Kyiv would be the biggest prize for the Russian military: the seat of government, and an intrinsic part of both Ukrainian and Russian history. With 3.6 million people, it covers 325 square miles and is divided by a broad river. It has about 500,000 structures — factories, ornate churches and high-rise apartments — many on narrow, winding streets.

Prior to the invasion, Kyiv was known for its colorful buildings and golden domes, its underground nightlife and its emergence after seven decades of Soviet rule as one of Europe’s most vibrant cities.

For weeks, the Russian Army has tried to penetrate the villages and suburbs around Kyiv, in what has become a seesaw battle for the critical areas that could be used to enter or encircle the capital. Tens of thousands of Russian troops have been pressing toward the city from the northwest and east, backed by columns of tanks, armored vehicles and artillery.

Inside Kyiv, Ukrainian soldiers and civilian volunteers have fortified the downtown with barriers, anti-tank mines and artillery. President Volodymyr Zelensky of Ukraine has refused to leave the capital, galvanizing his countrymen in daily motivational speeches, and mobilizing global opinion in a parallel information and image war.

Despite superior numbers and firepower, Russia has not achieved a breakthrough. The Russians have had heavy casualties, and — perhaps most surprising — have failed to achieve dominance in the air against Ukraine’s less powerful air force.

Longtime observers of Mr. Putin, however, are skeptical that Moscow will back off Kyiv, mindful that, throughout the invasion, Russia has made bold pronouncements, only to dissemble or do the opposite.

The Kremlin may be drawing on its playbook from the wars in Chechnya and Syria, where it has shown its willingness to try and target and terrorize local residents into submission.

On Tuesday, the American secretary of state, Anthony J. Blinken, cast doubt on the Russian promise to pare back its military pressure on Kyiv. “There is what Russia says and there’s what Russia does,” he said. “We are focused on the latter. And what Russia is doing is the continued brutalization of Ukraine.”