Ukrainian President Petro Poroshenko has called for a UN-mandated peacekeeping force to monitor the undermined ceasefire deal in east Ukraine.

"We see the best format would be a police mission from the European Union.

"We are sure this would be the most effective and best guarantee for security," Mr Poroshenko said at the start of a meeting with security chiefs.

Ukraine earlier pulled thousands of troops out of an encircled town 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.

They were unable to stop an advance by Russia-backed rebels fighting for territory the Kremlin calls "New Russia".

22 Ukrainian soldiers had been killed in the town in the past few days, the Ukrainian military high command said, with more than 150 wounded.

Mr Poroshenko, who flew to the front-lines, 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 advance on the town.

80% of the troops had withdrawn from the town by morning, Mr 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.

A commander of one of the main pro-government volunteer battalions who fought alongside regular Ukrainian forces said "a lot of bodies" had been left behind.

The wounded were being taken to Artemivsk about 30km north of Debaltseve in government-controlled territory.

This morning several Ukraine's Armed Forces and National Guard units withdrew from Debaltseve in an orderly and pre-planned manner. — Петро Порошенко (@poroshenko) February 18, 2015

Our soldiers, brave defenders of our land, gave a blow in the teeth to those who were trying to encircle them and withdrew from Debaltseve. — Петро Порошенко (@poroshenko) February 18, 2015

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," a senior rebel commander, Eduard Basurin, told journalists.

The rebels say the ceasefire, negotiated by Ukraine, Russia, Germany and France at a summit in Minsk, Belarus, last week, never applied to Debaltseve, which links the two rebel-controlled regions of eastern Ukraine, Donetsk and Luhansk.

Mr Poroshenko and the West say the rebel assault was reinforced by Russian tanks, artillery and soldiers, and that Russia was behind the decision to disavow the truce and advance.

Russia denies supporting the rebels.

A German government spokesman said the Minsk agreement had been damaged but it made sense to try to implement it.

Canada imposed sanctions on Russia over its conduct in Ukraine yesterday, a move Russia said would fuel further tension and prevent the implementation of the ceasefire.

NATO Secretary-General Jens Stoltenberg said: "The refusal of the separatists to respect the ceasefire threatens the agreement."

Britain said Europe should at least extend its sanctions against Russia if the ceasefire broke down.