Nearly 1,000 Ukrainian fighters who had held out inside Mariupol's pulverised steel plant have surrendered, Russia has said.
The battle for Mariupol turned the city into a worldwide symbol of defiance and suffering.
The Ukrainian fighters who emerged from the ruined Azovstal steelworks after being ordered by their military to abandon the last stronghold of resistance in the now-flattened port city face an uncertain fate.
Some were taken by the Russians to a former penal colony in territory controlled by Moscow-backed separatists.
It is unclear how many fighters remain inside the plant's labyrinth of tunnels and bunkers, where 2,000 were believed to be holed up at one point. A separatist leader in the region said no top commanders had emerged from the steelworks.
What will happen to the surrendered soldiers now?
While Ukraine said it hoped to get the soldiers back in a prisoner swap, Russia threatened to put some of them on trial for war crimes.
The first captured Russian soldier to be put on trial by Ukraine on war crimes charges has pleaded guilty to killing a civilian and could get life in prison.
Amnesty International said the Red Cross should be given immediate access to the fighters. Denis Krivosheev, Amnesty's deputy director for the region, cited lawless executions allegedly carried out by Russian forces in Ukraine and said the Azovstal defenders "must not meet the same fate".
Why was the Azovstal plant so important?
The plant was the only thing standing in the way of Russia declaring the full capture of Mariupol.
Its fall would make Mariupol the biggest Ukrainian city to be taken by Moscow's forces, giving a boost to Vladimir Putin in a war where many of his plans have gone awry.
Military analysts, though, said the city's capture at this point would hold more symbolic importance than anything else, since Mariupol is already effectively under Moscow's control and most of the Russian forces that were tied down by the drawn-out fighting have already left.
What happened after the surrender?
Russian Defence Ministry spokesman Major General Igor Konashenkov said 959 Ukrainian troops had abandoned the stronghold since they started coming out Monday.
Video showed the fighters carrying out their wounded on stretchers and undergoing pat-down searches before being taken away on buses escorted by military vehicles bearing the pro-Kremlin "Z" sign.
Mariupol's defenders grimly clung to the steel mill for months against the odds, preventing Russia from completing its occupation of the city and its port.
Its full capture would give Russia an unbroken land bridge to the Crimean Peninsula, which it seized from Ukraine in 2014. It also would allow Russia to focus fully on the larger battle for the Donbas, Ukraine's industrial east.
For Ukraine, the order to the fighters to surrender could leave President Volodymyr Zelenskyy's government open to allegations it abandoned the troops he described as heroes.
"Zelenskyy may face unpleasant questions," said Volodymyr Fesenko, who heads the independent Penta think tank in Kyiv. "There have been voices of discontent and accusations of betraying Ukrainian soldiers."
A hoped-for prisoner swap could also fall through, he cautioned.
Russia's main federal investigative body said it intended to interrogate the surrendering troops to "identify the nationalists" and determine whether they were involved in crimes against civilians.
What happens next?
Russia's top prosecutor asked the country's Supreme Court to designate Ukraine's Azov Regiment — among the troops that made up the Azovstal garrison — as a terrorist organisation. The regiment was originally a militia created by far-right nationalists, which was later incorporated into Ukraine's National Guard. Its commanders have said it no longer has any ties to the far right.
The Russian parliament was scheduled to consider a resolution to ban the exchange of any Azov Regiment fighters, but did not take up the issue on Wednesday.
Mariupol was a target of the Russians from the outset. The city — its prewar population of about 430,000 now reduced by about three-quarters — has largely been reduced to rubble by relentless bombardment, and Ukraine says over 20,000 civilians have been killed there.
During the siege, Russian forces launched lethal air strikes on a maternity hospital and a theatre where civilians had taken shelter. Close to 600 people may have been killed at the theatre.
Britain's defence ministry said Ukraine's defence of Mariupol "inflicted costly personnel losses" on Russian forces.