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 cease-fire that will be effective starting from the start of the day Sunday (2200 GMT or 5 p.m. EST 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 neighbor 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 cease-fire, 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.

The deal envisages a buffer zone to be created by pulling back the heavy artillery and rocket systems from 50 to 140 kilometers (31 to 87 miles) away from the frontline depending on their caliber. The withdrawal should begin no later than a second day after the cease-fire 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.

Speaking to reporters after the exhausting talks, Putin said "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."

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

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

"We came to an agreement, an agreement on a cease-fire and on a global political settlement of the Ukrainian conflict," Hollande said. "That global settlement will include all issues, from the cease-fire to the control of the border, to decentralization, and, of course, the pullback of heavy weapons and resuming economic relations."

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 cease-fire.

"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.

The French-German diplomatic dash came as President Barack Obama considered rising calls at home for sending U.S. lethal aid to Ukraine, a move that the European leaders fear would only widen hostilities.

The urgency felt by all sides appeared to be underlined by the extraordinary length and discomfort of the talks, which began Wednesday evening in the Belarusian capital and continued uninterrupted through the night as crowds of reporters waited anxiously in a marble-floored, chandeliered convention hall in Minsk. One was whisked away by doctors to be treated for exhaustion, according to the Interfax news agency.

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.

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

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 cease-fire that is announced is unconditional."

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

Rebel leaders lauded the agreement and said they're willing to give Kiev 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.

Donetsk rebel leader Alexander Zakharchenko said he will lay the blame on Kiev if the cease-fire collapses and that there "will be no meetings and no new agreements."