| ARTEMIVSK/BULAVYNE, Ukraine
ARTEMIVSK/BULAVYNE, Ukraine Ukraine pulled thousands of troops out of an encircled town on Wednesday after a massive assault by pro-Russian rebels, who ignored a new ceasefire to seize the strategic railway junction.
The fall of the besieged town of Debaltseve was one of the worst defeats of the war for Ukraine's troops, who proved unable to stop an advance by Moscow-backed rebels fighting for territory the Kremlin calls "New Russia".
Twenty-two Ukrainian soldiers had been killed in the town in the past few days, the Ukrainian military high command said, with more than 150 wounded.
President Petro Poroshenko, who flew to the frontline, nevertheless tried to cast the battle in a positive light, saying that by holding out as long as they had, Ukraine's troops had exposed "the true face of the bandits and separatists who are supported by Russia".
The Ukrainian troops had held out for three days beyond the start of a Europe-brokered ceasefire, forcing the rebels to disavow the truce to pursue their advance on the town.
Ukrainian troops, their faces blackened, some in columns, some in cars, arrived in Artemivsk, about 30 km (20 miles) north of Debaltseve in government-held territory.
Fighting did not halt with the retreat. A Reuters correspondent near Debaltseve saw black smoke rising over the town and heard loud blasts hours after the withdrawal began.
"One hundred and sixty-seven wounded have been taken to Artemivsk. They did not pick up a lot of bodies. I don't know the total figure," Semen Semenchenko, who heads the Donbass paramilitary battalion, said on Facebook.
Eighty percent of the troops had withdrawn from the town by morning, Poroshenko said, and the rest were leaving in what he described as a planned and orderly withdrawal. He said the force withdrawing numbered more than 2,000 men.
The rebels described the battle as a victory and said they let the Ukrainian troops leave only after they were defeated.
"There were no attempts by Ukrainian forces to break through. The surrounded Ukrainian forces were completely demoralised. They lost their direction. They began shooting at residential areas of Debaltseve," said a senior rebel commander, Eduard Basurin.
PUTIN SAYS SURRENDER
Despite drafting a U.N. Security Council resolution that called on all sides to cease fighting, Russia never criticised the rebel advance on Debaltseve. Hours before the town fell, President Vladimir Putin told Ukraine it should let its men surrender to save their lives.
The rebel advance drew denunciations from Western powers who accused Moscow of sending its armed forces to fight on behalf of the separatists in clear violation of the ceasefire negotiated with Germany and France last week in the Belarus capital Minsk.
Western countries pour scorn on Russia's denials that it aids the rebels. NATO says hundreds of Russian troops are fighting in eastern Ukraine with advanced weapons systems.
Nevertheless, the Western outrage was tempered by hope that Putin and the rebels would now halt their advance and allow the peace deal to take effect, having achieved their immediate objective in a war that has killed more than 5,000 people.
While Washington and its European allies threatened to impose new economic sanctions on Moscow if fighting did not end, they were also careful to say the peace deal was still alive.
"We don't consider it dead," U.S. State Department spokeswoman Jen Psaki said in Washington. "We still need time for the agreement to work through."
A German government spokesman said the Minsk agreement had been damaged but it still made sense to try to implement it.
From the moment the ceasefire took effect on Sunday, the rebels maintained that it did not apply to Debaltseve, a strategic location which links the main rebel-held areas.
With Debaltseve now in their hands, they indicated they would now start implementing the truce, announcing that they were pulling back heavy weapons from the front.
White House spokesman Josh Earnest said it was clear that Moscow and the separatists had not lived up to the terms of the ceasefire, and "their failure to do so does put them at risk of greater costs".
U.S. President Barack Obama has said he is making up his mind whether to provide weapons to Kiev. Earnest said he had no update on that decision.
European countries fear that sending weapons would backfire by escalating the conflict without providing Kiev enough fire power to win it. The EU is instead considering tighter economic sanctions, although these require unanimity among 28 members which is difficult to achieve.
EU foreign policy chief Federica Mogherini said in Brussels the rebels' actions were in clear violation of the ceasefire and "the EU stands ready to take appropriate action in case the fighting and other negative developments in violation of the Minsk agreements continue."
For Poroshenko, ordering the retreat may have saved the lives of thousands of Ukrainian soldiers. But another military defeat, coming as Ukraine approaches the first anniversary of the overthrow of the Moscow-backed president Viktor Yanukovich, may be difficult to stomach for a population weary of a long conflict.
Russia has already annexed Ukraine's Crimea Peninsula, and Western countries believe Putin's goal is to establish a "frozen conflict" in eastern Ukraine, gaining permanent leverage over a country of 45 million people seeking integration with Europe.
(Additional reporting by Pavel Polityuk, Natalia Zinets, Alessandra Prentice and Richard Balmforth in Kiev, Polina Devitt in Moscow; Writing by Elizabeth Piper, Richard Balmforth and Peter Graff)