Ukrainian officials say the regiment that doggedly defended a steel mill in the port city of Mariupol has completed its mission.

The declaration came on Monday after more than 260 fighters, including some badly wounded, were evacuated and taken to areas under Russia’s control.

Ukrainian President Volodymyr Zelensky said the evacuation to separatist-controlled territory was done to save the lives of the fighters who endured weeks of Russian assaults in the maze of underground passages below the hulking Azovstal steelworks. He said the “heavily wounded” were getting medical help.

“Ukraine needs Ukrainian heroes to be alive. It’s our principle,” he said. An unknown number of fighters stayed behind to await other rescue efforts.

The steel mill’s defenders got out as Moscow suffered another diplomatic setback in the war, with Sweden joining Finland in deciding to seek Nato membership. And Ukraine made a symbolic gain when its forces reportedly pushed Russian troops back to the Russian border in the Kharkiv region.

Still, Russian forces pounded targets in the industrial heartland of eastern Ukraine known as the Donbas, and the death toll, already many thousands, kept climbing with the war set to enter its 12th week on Wednesday.

Deputy Defence Minister Hanna Maliar said 53 seriously wounded fighters were taken from the Azovstal plant to a hospital in Novoazovsk, east of Mariupol.

An additional 211 fighters were evacuated to Olenivka through a humanitarian corridor. She said an exchange would be worked out for their return home.

“Mariupol’s defenders have fully accomplished all missions assigned by the command,” she said.

Officials also planned to keep trying to save the fighters who remained inside. Military experts generally put the number of fighters at the plant at anywhere from a few hundred to 1,000.

“The work to bring the guys home continues, and it requires delicacy and time,” Mr Zelensky said.

Before the evacuations from the steelworks began, the Russian Defence Ministry announced an agreement for the wounded to leave the mill for treatment in a town held by pro-Moscow separatists. There was no immediate word on whether the wounded would be considered prisoners of war.

After nightfall on Monday, several buses pulled away from the steel mill accompanied by Russian military vehicles. Ms Maliar later confirmed that the evacuation had taken place.

Russia Ukraine War A Week Photo Gallery
Workers clear rubble at the side of the damaged Mariupol theatre (AP Photo)

“Thanks to the defenders of Mariupol, Ukraine gained critically important time to form reserves and regroup forces and receive help from partners,” she said. “And they fulfilled all their tasks. But it is impossible to unblock Azovstal by military means.”

Elsewhere in the Donbas, the eastern city of Sievierdonetsk came under heavy shelling that killed at least 10 people, said Serhiy Haidai, the governor of the Luhansk region.

In the Donetsk region, Governor Pavlo Kyrylenko said on Facebook that nine civilians were killed in shelling.

The western Ukrainian city of Lviv was rocked by loud explosions early on Tuesday. Witnesses counted at least eight blasts accompanied by distant booms, and the smell of burning was apparent some time later.

An Associated Press team in Lviv, which was under an overnight curfew, said the sky west of the city was lit up by an orange glow.

The chairman of the Lviv Regional Military Administration said the Russians fired on military infrastructure in the Yavoriv district. The city of Yavoriv is less than 10 miles (15 kilometres) from the Polish border.

Ukrainian troops also advanced as Russian forces pulled back from around the north-eastern city of Kharkiv in recent days.

Russia has been plagued by setbacks in the war, most glaringly in its failure early on to take the capital of Kyiv. Much of the fighting has shifted to the Donbas but also has turned into a slog, with both sides fighting village-by-village.

Away from the battlefield, Sweden’s decision to seek Nato membership followed a similar decision by neighbouring Finland in a historic shift for the countries, which were nonaligned for generations.

Russia Ukraine War
Ukrainian servicemen take rest in a recently retaken village north of Kharkiv (Mstyslav Chernov/AP)

Swedish Prime Minister Magdalena Andersson said her country would be in a “vulnerable position” during the application period and urged her fellow citizens to brace themselves.

“Russia has said that that it will take countermeasures if we join Nato,” she said. “We cannot rule out that Sweden will be exposed to, for instance, disinformation and attempts to intimidate and divide us.”

But President Recep Tayyip Erdogan of Turkey, a Nato member, ratcheted up his objection to their joining. He accused the countries of failing to take a “clear” stance against Kurdish militants and other groups that Ankara considers terrorists, and of imposing military sanctions on Turkey.

He said Swedish and Finnish officials who are expected in Turkey next week should not bother to come if they intend to try to convince Turkey of dropping its objection.

All 30 current Nato members must agree to let the Nordic neighbours join.

Russian President Vladimir Putin said Moscow “does not have a problem” with Sweden or Finland as they apply for Nato membership, but that “the expansion of military infrastructure onto this territory will of course give rise to our reaction in response”.

Mr 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.

Nato secretary-general Jens Stoltenberg has said the membership process for both could be quick.