The Ukrainian army said the soldiers in Mariupol had "performed their combat task" and now the main goal was to "save the lives of personnel".
By holding the steelworks, they stopped Russian forces from rapidly capturing the southern city of Zaporizhzhia, a statement on Facebook said.
Despite the resources of its giant neighbour, Ukraine has managed to repel the Russian army for longer than many expected, fortified by weapons and cash from Western allies.
The latest example of this came Monday, when Ukraine's defence ministry announced its troops had regained control of territory on the Russian border near the country's second-largest city of Kharkiv, which has been under constant attack.
Since failing to take Kyiv in the early weeks of the war, Moscow has switched its focus to Donbas, a region near the Russian border that is home to pro-Russian separatists.
Presidential adviser Oleksiy Arestovich told local television Sunday that Russian troops were being redeployed to take Severodonetsk, the easternmost city still held by Ukraine.
Its occupation would grant the Kremlin de facto control of Lugansk, one of two regions -- along with Donetsk -- that comprise Donbas.
But Russia's attempt to encircle the city of 100,000 has been repelled with heavy equipment losses, while Russian-occupied railway bridges were blown up, Ukrainian officials said.
Russia continued strikes on Lugansk, killing two people and wounding nine during shelling of a Severodonetsk hospital, the Ukrainian presidency said Monday.
A further 10 people were killed by Russian strikes on Severodonetsk, according to the local governor.
Police in neighbouring Donetsk said six civilians were killed and 12 wounded in Russian shelling over the past 24 hours.
Six million refugees have fled Ukraine since the war began, and another eight million have been internally displaced, according to UN agencies.
NATO 'no direct threat'
With Moscow showing no sign of relenting nearly three months into its invasion, Finland and Sweden are poised to give up decades of military non-alignment by joining the NATO military alliance.
Swedish prime minister Magdalena Andersson confirmed on Monday her country would apply to join the alliance, a day after Finland -- which shares a 1,300-kilometre (800-mile) border with Russia -- said the same.
Russian president Vladimir Putin said the move poses "no direct threat for us... but the expansion of military infrastructure to these territories will certainly provoke our response."
The Russian leader's reaction was more moderate than comments earlier Monday from deputy foreign minister Sergei Ryabkov, who called the expansion a "grave mistake with far-reaching consequences".
The move is not a done deal in any case, with Turkish president Recep Tayyip Erdogan on Monday confirming his country's intention to block the applications, accusing Finland and Sweden of harbouring terror groups, including outlawed Kurdish militants.
Sweden and Finland have failed to respond positively to Turkey's 33 extradition requests over the past five years, justice ministry sources told the official Anadolu news agency on Monday.
Any membership bid must be unanimously approved by NATO's 30 nations.
But US secretary of state Antony Blinken voiced confidence Sunday that Sweden and Finland would join NATO despite Turkey's opposition.
Turkish foreign minister Mevlut Cavusoglu will meet Blinken in Washington on Wednesday, where Ankara's objections are expected to figure high on the agenda.
'Time is running out'
Meanwhile EU foreign ministers met in Brussels to discuss a ban on Russian oil -- proposed as part of an unprecedented economic sanctions on Moscow but being blocked by Hungary over the economic cost.
"We are unhappy with the fact that the oil embargo is not there," Ukraine's top diplomat Dmytro Kuleba said afterwards.
"It's clear who's holding up the issue. But time is running out because every day Russia keeps making money and investing this money into the war."
The war meanwhile is taking its toll on the continent's growth. The European Commission sharply cut its eurozone forecast for 2022 to 2.7 per cent, blaming skyrocketing energy prices.
Separately, French automaker Renault has handed over its Russian assets to Moscow, while US fast food giant McDonald's announced it would be pulling out, citing the "humanitarian crisis caused by the war."