Ukrainian fighters extracted from the last bastion of resistance in Mariupol have been taken to a former penal colony in enemy-controlled territory.

A top military official hopes they can be exchanged for Russian prisoners of war but a Moscow politician said they should be brought to "justice".

The Russian parliament plans to take up a resolution on Wednesday to prevent the exchange of Azov Regiment fighters, who held out for months inside the Azovstal steelworks plant while Mariupol was under siege, according to Russian news agencies.

Nearly 1,000 Ukrainian troops holed up at Azovstal have handed themselves over this week, the Russian Defence Ministry said on Wednesday. More than 260 left on Monday, and nearly 700 since then.

Many are wounded, and it's not clear how many fighters still remain at the sprawling steel plant.

Earlier, Ukraine's deputy defence minister, Hanna Maliar, said negotiations for the fighters' release were ongoing, as were plans to rescue fighters who are still inside the plant.

Ukrainian President Volodymyr Zelensky said "the most influential international mediators are involved" in the plans. Officials have not said how many remain inside.

The troops in the waterside steel plant have been the last pocket of resistance in Mariupol, which has been effectively in Russian hands for some time now.

In an unrelated development that could take the shine off of any Russian declaration of victory in Mariupol, Sweden and Finland both officially applied to join Nato on Wednesday, a move driven by security concerns over the Russian invasion.

Russian President Vladimir Putin launched the invasion on February 24 in what he said was an effort to check Nato's expansion but has seen that strategy backfire by driving the public in Sweden and Finland, traditionally non-aligned nations, towards the western alliance.

Nato secretary-general Jens Stoltenberg said he welcomed the applications, which now have to be considered by 30 member countries.

Mariupol was targeted by Russia in the early days of the invasion.

Britain's Ministry of Defence said in its daily intelligence report on Wednesday that Ukraine had bitterly contested the strategic port city, costing Russia time and troops as it sought to capture a land corridor from its home territory to the Crimean Peninsula, which it seized from Ukraine in 2014.

"Despite Russian forces having encircled Mariupol for over 10 weeks, staunch Ukrainian resistance delayed Russia's ability to gain full control of the city," the ministry said. "This frustrated its early attempts to capture a key city and inflicted costly personnel losses amongst Russian forces."

More than 260 Ukrainian fighters - some of them seriously wounded and taken out on stretchers - left the ruins of the Azovstal plant on Monday and turned themselves over to the Russian side in a deal negotiated by the warring parties.

An additional seven buses carrying an unknown number of Ukrainian soldiers from the plant were seen arriving at a former penal colony on Tuesday in the town of Olenivka, about 55 miles north of Mariupol.

While Russia called it a surrender, the Ukrainians avoided that word and instead said the plant's garrison had successfully completed its mission to tie down Russian forces and was under new orders.

With the fighters' departures, Mariupol was on the verge of falling under complete Russian control. Its capture would be the biggest city to be taken by Moscow's forces and would give the Kremlin a badly needed victory, though the landscape has largely been reduced to rubble.

The soldiers who left the plant were searched by Russian troops, loaded onto buses and taken to two towns controlled by Moscow-backed separatists. More than 50 of the fighters were seriously wounded, according to both sides.

It was impossible to confirm the total number of fighters brought to Olenivka or their legal status.

While both Mariupol and Olenivka are officially part of Ukraine's eastern Donetsk region, Olenivka has been controlled by Russia-backed separatists since 2014 and forms part of the unrecognised "Donetsk People's Republic".

Footage shot by the Associated Press showed that the convoy was escorted by military vehicles bearing the pro-Kremlin "Z" sign, as Soviet flags fluttered from poles along the road. About two dozen Ukrainian fighters were seen in one of the buses.

Ukraine's human rights ombudsman said the Russian military was also holding more than 3,000 civilians from Mariupol at another former penal colony near Olenivka.

Ombudsman Lyudmyla Denisova said most civilians are held for a month, but those considered "particularly unreliable", including former soldiers and police, are held for two months. The detainees include about 30 volunteers who delivered humanitarian supplies to Mariupol while it was under siege, she said.

While Ukraine expressed hope that the fighters would be released, Vyacheslav Volodin, speaker of the lower house of the Russian parliament, said, without evidence, that there were "war criminals" among the defenders and "we must do everything to bring them to justice".

Russia's main federal investigative body said it intends to interrogate the troops to "identify the nationalists" and determine whether they were involved in crimes against civilians. Also, Russia's top prosecutor asked the country's Supreme Court to designate Ukraine's Azov Regiment a terrorist organisation. The regiment has links to the far right.

The operation to abandon the steel plant and its labyrinth of tunnels and bunkers signalled the beginning of the end of a nearly three-month siege that turned Mariupol into a worldwide symbol of both defiance and suffering.

The Russian bombardment killed more than 20,000 civilians, according to Ukraine, and left the remaining inhabitants - perhaps a quarter of the southern port city's pre-war population of 430,000 - with little food, water, heat or medicine.

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.

Gaining full control of Mariupol, in the south of the eastern Donbas region, would be more of a symbolic boost for Mr Putin than a military win, said retired French Vice Admiral Michel Olhagaray, a former head of France's centre for higher military studies.

"Factually, Mariupol had already fallen," he said.

But because of the Azovstal defenders' "incredible resistance", Ukraine can also claim that it came out on top, he said.

"Both sides will be able take pride or boast about a victory - victories of different kinds," he said.