Government soldiers pulled out of a ferociously contested railway hub in eastern Ukraine Wednesday, ending a siege so intense the retreating troops said they couldn’t get water or food amid relentless shelling by Russian-backed separatists.

At least six soldiers were killed in the withdrawal and more than 100 wounded.

President Petro Poroshenko sought to portray the fall of Debaltseve in a positive light, saying the pullback was carried out “in a planned and organized manner,” despite assertions by exhausted and dirt-caked soldiers, some of whom had made their way out on foot, that their forces suffered heavy losses.

No matter the circumstances, the retreat appeared to be an acceptance by Poroshenko of a humiliating defeat in exchange for a chance at pushing a shaky truce agreement forward and securing the pullback of heavy weapons.

The loss of Debaltseve was a serious setback for the army. The town is a strategic railroad junction that lies on the most direct route between the separatist east’s two major cities, Donetsk and Luhansk. By taking control of it, the rebels significantly boost the region’s capacity to function as an independent entity.

Debaltseve’s strategic importance kept the battle raging even after a cease-fire between Ukrainian forces and the Russia-backed rebels went into effect Sunday. Relinquishing the town could remove the major impediment to a lasting cease-fire and begin the next step that was agreed to in a peace deal last week: the pullback of heavy weapons by both sides to create a buffer zone at least 30 miles wide.

But the images of traumatized soldiers and their stories of deprivation will be another wound to a national psyche already bruised by Russia’s annexation of the Crimean peninsula last March and the vicious fighting in the Russia-bordering east, where Ukrainian forces suffered heavy losses at the hands of rebels they and the West claim got a huge boost from Russian equipment and troops.

Semyon Semenchenko, a battalion commander and a member of parliament, accused the military command of betraying the country’s interests in Debaltseve.

“We had enough forces and means,” he said in a Facebook post. “The problem is the command and coordination. They are as bad as can be.”

Semenchenko’s words were especially cutting because he became well-known during another major rebel rout of Ukrainian forces in the battle for Ilovaysk last summer. Semenchenko was critical of the government for allegedly abandoning volunteer troops there.

A top separatist official, Denis Pushilin, meanwhile contended that the government pullback Wednesday wasn’t a retreat at all, but that rebels had overpowered most of the soldiers, killing them or forcing them to surrender.

Wednesday morning, several dozen weary soldiers from Debaltseve arrived in the nearby town of Artemivsk.

One spoke of heavy government losses while another said they had been unable to get food or water because of the intense rebel shelling.

“We’re very happy to be here,” the hungry soldier said. “We were praying all the time and already said goodbye to our lives a hundred times.”