The conquest of Avdiivka represents a strategic and symbolic victory for Russia, strengthening its defence of the regional capital, Donetsk, and potentially opening up avenues for further offensives against Ukrainian-held territory.
Ukrainian commander-in-chief Oleksandr Syrskyi says he ordered a retreat from the city in order to save soldiers' lives.
Now evidence of possible war crimes has emerged, as relatives of six soldiers found dead following the takeover of the city say they were executed after surrendering. Ukrainian authorities are investigating. Moscow has not yet commented.
The BBC has spoken to Ukrainian soldiers who withdrew from Avdiivka. Their testimony paints a picture of unresponsive commanders who refused their troops' desperate pleas to retreat as they were encircled by Russian troops.
When the order finally came, they say, it was too late and and they were completely surrounded.
'We don't know what to do'
A video posted by Russian military bloggers following the capture of Avdiivka appears to show the bodies of Ukrainian soldiers believed to have surrendered after Russian troops captured their position.
Ivan Zhytnyk, Andriy Dubnytsky and Georgiy Pavlov have been identified by relatives as the dead soldiers in the video.
The BBC has spoken to them and to other soldiers who were at the base - named "Zenith", on the south-eastern outskirts of Avdiivka - in order to reconstruct the chaotic events which led to their deaths.
For weeks, the fighters at the position had been waging an increasingly desperate battle to hold their position.
They had repeatedly asked their commanders to pull them out, fearing a full encirclement was imminent. But their requests were denied and they were told to wait.
On 13 February, the defenders of Zenith were finally ordered to withdraw to another position in Avdiivka but by then it was too late.
When the order to leave came, Ivan Zhyntyk, a paramedic, messaged his brother-in-law Dmitriy. "We were told to retreat and fight our way back. But behind us are [Russians]. I don't know what to do," he wrote.
Ivan and nine other men were tasked with attacking Russian positions and opening up a safe passage for the others. "They were the bravest ones," says Viktor Bilyak, a soldier from the 110th brigade who was in Zenith.
But the group was confronted by Russian artillery and forced to turn back. Only three managed to return to base.
Ivan was among them, but he was badly injured and collapsed in a field before reaching the base. Hours later, his comrades from the Zenith base tried to rescue him.
Viktor Bilyak and three others put him on a stretcher and started carrying him out, under relentless Russian mortar fire. One of the shells landed nearby. Viktor, wounded, was forced to return to the base. Georgiy Pavlov came out to replace him.
Viktor says the group was then attacked by two kamikaze drones. "Instead of one wounded, we got five more."
'Leave them behind'
The soldiers eventually made it back to Zenith. Viktor and the soldiers' relatives say they were promised evacuation by their superiors, but it never arrived.
Later, Ivan called his commander to learn about evacuation. The voice on the radio told him to get out of Zenith on their own, as sending a rescue team was too risky.
"What about the wounded?" he asked. "Leave them behind," the voice instructed him.
"Everyone heard this conversation on radio and froze," Viktor recalls.
Those who could walk, including Viktor, left the base at night without their wounded brothers-in-arms.
"Under relentless fire, carrying the wounded in the darkness was not possible," he says.
They retreated in small groups. "The enemy opened fire with mortars, tanks, artillery, night kamikaze drones - all at once," said Viktor. A group walking behind him was hit by an artillery shell. None of them survived.
While Viktor and others were trying to reach their main position in Avdiivka, six people were left behind at Zenith.
Five were wounded and couldn't walk, including paramedic Ivan Zhytnyk, sniper Georgiy Pavlov and anti-tank fighter Andriy Dubnytsky. These men's bodies were later identified in the video posted by Russian bloggers.
One, Mykola Savosik, was not wounded but decided to stay with his comrades. He believed he would be taken as a prisoner of war, Viktor said.
The 110th brigade posted a message on their Facebook page saying that because of the full encirclement of Zenith, Ukraine had "contacted organisations that hold talks on prisoner exchanges" to assist their soldiers.
The Russian side reportedly agreed to evacuate the Ukrainian wounded and later exchange them.
This message was passed on to Ivan and others at Zenith a few hours before Russians arrived. They were instructed not to show any resistance and save their lives.
But Ivan told his brother-in-law on the phone that he didn't believe that Russians would "keep the wounded alive".
'Are they there?'
Around 11:15 on 15 February, Inna Pavlova received a message from her son Georgiy. "The Russians know that we are here alone," he wrote. She hasn't heard from him since.
Around that time, Ivan video-called his brother-in-law Dmitriy. In the middle of the conversation, a Russian soldier entered the building. "Put the gun away," a voice could be heard in the video, recorded by Dmitriy.
"Are they there?" Dmitriy asked Ivan. "Yes," Ivan quietly replied. At this point, Dmitriy stopped recording video, but the call continued for a couple of minutes longer.
"I saw a bearded man," Dmitriy recalls. "I asked Ivan to give him the phone. I wanted to ask them not to kill them. But I heard the voice say: 'Switch off the phone'."
Ivan's relatives were sure that he and other soldiers had been taken prisoner. "They didn't resist," says Ivan's sister.
On 17 February, Col Gen Syrskyi ordered a full withdrawal from Avdiivka in order to "preserve the lives … of servicemen". But it was too late for many soldiers, including the six who surrendered.
The following day, a video appearing to show their bodies was posted by Russian sources to social media.
Relatives of Ivan, Andriy and Georgiy say they have no doubt that they are the men who appear in the video.
"They were killed by the Russians," says Georgiy's mother, Inna Pavlova. "But our military leadership allowed it to happen."