More than 250 Ukrainian fighters have surrendered to Russian forces at the Azovstal steelworks in Mariupol after weeks of desperate resistance, bringing an end to the most devastating siege of Russia’s war in Ukraine and allowing President Vladimir Putin to claim a rare victory in his faltering campaign.

Even as the Kremlin prepares to take full control of the ruins of Mariupol, it faces the growing prospect of defeat in its bid to conquer all of Ukraine’s eastern Donbas because its badly mauled forces lack the manpower for significant advances, some analysts of the Russian campaign said.

Buses left the steelworks late on Monday in a convoy escorted by Russian armoured vehicles. Five arrived in the Russian-held town of Novoazovsk, where Moscow said wounded fighters would be treated.

Seven buses carrying Ukrainian fighters from the Azovstal garrison arrived at a newly reopened prison in the Russian-controlled town of Olenivka near Donetsk, a Reuters witness said.

Some women were aboard at least one of the buses in Olenivka, Reuters video showed. Some of the women wore olive green uniforms, as did most of the men. All of them appeared exhausted.

What will happen to the fighters was unclear. The Kremlin said Putin had personally guaranteed the prisoners would be treated according to international standards, and Ukrainian officials said they could be exchanged for Russian captives.

TASS news agency said a Russian committee planned to question the soldiers as part of an investigation into what Moscow calls “Ukrainian regime crimes”.

The denouement of a battle that came to symbolise Ukrainian resistance gives Moscow total control of the Azov Sea coast and an unbroken stretch of eastern and southern Ukraine, even as its troops retreat from the outskirts of Kharkiv in the northeast.

Officials from both sides said on Tuesday that peace talks aimed at ending the war had stagnated. Negotiators last convened in person in late March, and there has been little communication between them in recent weeks.

The complete capture of Mariupol is Russia’s biggest victory since it launched what it calls a “special military operation” on February 24. But the port lies in ruins, and Ukraine believes tens of thousands of people were killed under months of Russian bombardment.

Russia said at least 256 Ukrainian fighters had “laid down their arms and surrendered”, including 51 severely wounded. Ukraine said 264 soldiers, including 53 wounded, had left.

Russian defence ministry video showed fighters leaving the plant, some carried on stretchers, others with hands up to be searched by Russian troops.

While both sides spoke of a deal under which all Ukrainian troops would abandon the steelworks, many details were not yet public, including how many fighters still remained inside, and whether any form of prisoner swap had been agreed.

Ukrainian Deputy Defence Minister Hanna Malyar told a briefing that Kyiv would not disclose how many fighters remained inside until all were safe. Ukraine’s military said units in Azovstal had completed their combat mission.

Deputy Prime Minister Iryna Vereshchuk said Kyiv aimed to arrange a prisoner swap for the wounded once their condition stabilised.

Elsewhere, Ukrainian forces have been advancing at their fastest pace for more than a month, driving Russian forces out of the area around Kharkiv, Ukraine’s second largest city.

Ukraine says its forces had reached the Russian border, 40 kilometres north of Kharkiv. They have also pushed at least as far as the Siverskiy Donets river 40km to the east, where they could threaten supply lines to Russia’s main advance in the Donbas.

Russia is still pressing that advance despite taking heavy losses. Ukrainian President Volodymyr Zelenskiy said Russia had shelled the areas in the north and west on Tuesday to compensate for what he called Russia’s failures in the east and south.

“They cannot produce any successes for their combined forces in areas where they are trying to advance,” Zelenskiy said in a late-night address. “These strikes, like many of those that came before them, will give them nothing.”