By Jaroslav Lukiv, BBC News
Ukraine's military says it is withdrawing its troops from Avdiivka - the key eastern town besieged by Russian forces.
Ukraine's Commander-in-Chief Oleksandr Syrskyi said he acted "to avoid encirclement and preserve the lives and health of service personnel".
He added that the troops were being moved to "more favourable lines".
Avdiivka - a gateway to the Russian-seized city of Donetsk - has been engulfed in fierce fighting for months.
The town - which has been almost completely destroyed - has been on the front line since 2014, when Russian-backed fighters seized large swathes of the eastern Donetsk and Luhansk regions.
The fall of Avdiivka marks the biggest change on the more than 1000km-long front line since Russian troops seized the nearby town of Bakhmut in May 2023.
Russian President Vladimir Putin launched a full-scale invasion of Ukraine on 24 February 2022.
In a statement on Facebook early on Saturday, General Colonel Syrskyi said his decision was based on "the operational situation around Avdiivka".
"Our soldiers performed their military duty with dignity, did everything possible to destroy the best Russian military units, inflicted significant losses on the enemy in terms of manpower and equipment."
Syrskyi - who was only appointed as the country's top commander a few days ago - said Ukrainian troops were "taking measures to stabilise the situation and maintain our positions.
US National Security Council spokesman John Kirby had earlier warned that Avdiivka was "at risk of falling into Russian control".
He said this was largely "because the Ukrainian forces on the ground are running out of artillery ammunition".
"Russia is sending wave after wave of conscript forces to attack Ukrainian positions," he said.
"And because Congress has yet to pass the supplemental bill, we have not been able to provide Ukraine with the artillery shells that they desperately need to disrupt these Russian assaults."
Earlier this week, the US Senate approved a $US95 billion foreign aid package - including $US60b for Ukraine - after months of political wrangling, but it faces an uphill battle in the House of Representatives.
Ukraine is critically dependent on weapons supplies from the US and other Western allies to keep fighting Russia - a much bigger military force with an abundance of artillery ammunition.
NATO Secretary General Jens Stoltenberg warned on Thursday that the US failure to approve continued military assistance to Ukraine was already having an impact on the battlefield.
Russian troops have been making significant gains in Avdiivka recently, threatening to encircle it.
Some Ukrainian soldiers privately admitted the town could fall at any moment.
"We're upset," Ukrainian officer Oleksii, from Ukraine's 110th Mechanised Brigade in the Avdiivka area, told the BBC earlier this week, standing beside a huge mobile artillery piece as Russian guns boomed in the distance.
"Currently we have two shells, but we have no [explosive] charges for them… so we can't fire them. As of now, we have run out of shells," said Oleksii.
- This story was first published by BBC