Guns will fall silent, heavy weapons will pull back from the front, and Ukraine will trade a broad autonomy for the east for control of the Russian border by the end of the year under a peace deal hammered out Thursday in all-night negotiations between Russia, Ukraine, France and Germany

The deal was full of potential pitfalls, however, that could derail its implementation. In announcing the plan, Russia and Ukraine disagreed over what exactly they had agreed to in marathon 16-hour talks, including the status of a key town under rebel siege.

Russian President Vladimir Putin told reporters that the agreement envisages a ceasefire that will be effective starting from the start of the day Sunday (5 p.m. ET Saturday) as well as a special status for the rebel regions, provisions on border controls and humanitarian issues.

Ukrainian President Petro Poroshenko said there was no agreement on any autonomy or federalization for eastern Ukraine, a longtime demand of Russia that wants it to maintain leverage over its neighbour and prevent it from ever joining NATO.

The deal, however, requires the Ukrainian parliament to give wide powers to the eastern regions as a condition for restoring Ukraine's full control over the border — a provision that would be certain to trigger heated political debate in Ukraine.

The agreement is a complex compromise that allows both Russia and Ukraine to claim victory, but it's full of potential pitfalls that may derail its implementation. Uncertainty remained even regarding the declared ceasefire, as Putin admitted that he and Poroshenko disagreed on assessing the situation in a key flashpoint, the government-held town of Debaltseve.

"We now have a glimmer of hope," said German Chancellor Angela Merkel, who brokered the talks in the Belarusian capital together with French President Francois Hollande. "But the concrete steps of course have to be taken, and we will still face major obstacles. But on balance I can say that we have achieved gives significantly more hope than if we had achieved nothing. So one can say that this initiative was worth it."

More than 5,300 people have died since April in the fighting, which continued to rage Thursday even as the four leaders were engaged in talks.

Buffer zone

The deal envisages a 50- to 140-kilometre wide buffer zone as both parties pull back heavy artillery and rocket systems from the front line, depending on their calibre. The withdrawal should begin no later than a second day after the ceasefire becomes effective and be completed within two weeks.

In a win for Ukraine, the rebel regions, which held their own elections last fall that Ukraine and the West declared a sham, are obliged to hold a new local vote under the Ukrainian law.

But in a key concession to Russia, the deal says the restoration of Ukrainian control over the border with Russia in rebel-controlled areas could be completed only by the end of 2015 on condition that Ukraine conducts a constitutional reform granting wide powers to the eastern regions, including the right to form their own police force and trade freely with Russia.

Belarus Ukraine

Ukrainian President Petro Poroshenko says the ceasefire accords signed Thursday in Minsk give no autonomy to rebel-held areas. (Alexander Zemlianichenko/Associated Press)

"It was not the best night in my life. But the morning, I think, is good because we have managed to agree on the main things despite all the difficulties of the negotiations," Putin told reporters.

Hollande said he and Merkel are committed to helping verify the ceasefire process in Ukraine, hailing the deal as a "relief to Europe."

In Kiev, Ukrainian military spokesman Andriy Lysenko said despite the peace talks, Russia sent 50 tanks and a dozen heavy weapons overnight into Ukraine.

In the rebel stronghold of Donetsk, residents who have seen their city pounded daily by artillery since late May were skeptical of the deal.

"We will see whether there will be a cease-fire or not," Tatyana Griedzheva said. "You have seen it with your own eyes, the kind of cease-fire that we have already had."

A previous ceasefire agreed in September fell apart as Ukrainian government forces and Russian-backed rebels both tried to gain more ground.

Poroshenko stressed that the agreement contains "a clear commitment to withdraw all foreign troops, all mercenaries from the territory of Ukraine," a reference to the soldiers and weapons that Ukraine and the West say Russia has sent into eastern Ukraine to back the rebels.

Moscow has denied the accusations, saying Russians in eastern Ukraine were volunteers, but the sheer number of sophisticated heavy weapons in rebels' possession belies the denial.

Merkel said that, at the end, Putin exerted pressure on the separatists to get them to agree to the ceasefire.

"I have no illusions, we have no illusions — a great, great deal of work is still necessary. But there is a real chance to make things better," she said.

While the four leaders hailed the agreement, it became immediately clear that Russia and Ukraine continued to disagree on how to end fighting around Debaltseve, a key transport hub between the two main rebel-controlled eastern cities of Donetsk and Luhansk.

Putin said that the rebels consider the Ukrainian forces surrounded and expect them to surrender, while Ukraine says its troops have not been blocked.

Weapons pullback

The Russian leader said that the peace deal also determines a division line from which heavy weapons will be pulled back.

The line of division and other key provisions were contained in a document endorsed by rebel chiefs and the representatives of Russia, Ukraine and the Organization for Security and Cooperation in Europe. That agreement was endorsed by the four leaders, who issued a separate declaration.

"We were presented with various unacceptable conditions of withdrawal and surrender," Poroshenko said. "We did not agree to any ultimatums and stated firmly that the ceasefire that is announced is unconditional."

Rebel leaders lauded the agreement and said they're willing to give Kyiv another chance. "(We) give this chance to Ukraine to change its constitution, to change its attitude," rebel leaders in Luhansk Igor Plotnitsky said on Russian television.

With files from Reuters