Guns would fall silent, heavy weapons would pull back from the front and Ukraine would trade a broad autonomy for the east to get back control of its Russian border by the end of 2015 under a peace deal hammered out Thursday in all-night negotiations between Russia, Ukraine, France and Germany.
The deal was full of potential pitfalls that could derail its implementation, however. In announcing the plan, Russia and Ukraine differed over what exactly they had agreed to in the marathon 16-hour talks, including the status of Debaltseve, a key town now under rebel siege.
Russian President Vladimir Putin told reporters that the agreement envisages a ceasefire beginning Sunday (2200 GMT (5:00pm EST) Saturday) as well as a special status for Ukraine's separatist regions and provisions to address border concerns 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, which wants that to maintain its leverage over Ukraine and prevent its neighbor 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 its border with Russia - a provision certain to trigger heated debate in Kiev.
Uncertainty remained even on the ceasefire, as Putin admitted he and Poroshenko disagreed on the situation at 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 of Minsk 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 what we have achieved gives significantly more hope than if we had achieved nothing."
More than 5,300 people have died since April in eastern Ukraine amid fighting between the Russian-backed separatists and government troops. Battles still raged Thursday even as the four leaders held peace talks.
The new deal envisages a 50- to 140-kilometer (31- to 87-mile) wide buffer zone as both parties pull back heavy artillery and rocket systems from the front line, depending on their caliber. The withdrawal should begin no later than the second day after the ceasefire becomes effective and should 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 its border with Russia in rebel-controlled areas could be completed only by the end of 2015 and on the condition that Ukraine conducts a constitutional reform granting wide powers to the eastern regions, including the right to form their own police and to trade freely with Russia.
"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 in Ukraine, hailing the deal as a "relief to Europe."
In Kiev, Ukrainian military spokesperson 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 ceasefire or not," Tatyana Griedzheva said. "You have seen it with your own eyes, the kind of ceasefire that we have already had."
A previous ceasefire in September was violated repeatedly as Ukrainian forces and the 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 Russian 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 any Russia fighters were volunteers, but the sheer number of sophisticated heavy weapons in the rebels' possession belies the denial.
Merkel said, in 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. Inn Brussels, European Union President Donald Tusk said the test of the Minsk agreement will be whether the weekend ceasefire holds in eastern Ukraine.
The French-German diplomatic offensive came as US President Barack Obama considered sending lethal weapons to Ukraine, a move that European nations feared would only widen the hostilities.
The urgency felt by all sides was underlined by the extraordinary length and discomfort of the talks, which began Wednesday evening and continued uninterrupted through the night as crowds of reporters waited anxiously in a marble-floored, chandeliered convention hall in Minsk.
While the four leaders hailed the agreement, Russia and Ukraine still disagreed on how to end the fighting around Debaltseve, a key transport hub between the rebels' two main cities of Donetsk and Luhansk. Putin said the rebels consider the Ukrainian forces there surrounded and expect them to surrender, while Ukraine says its troops have not been blocked.
The Russian leader said 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 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 European 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 Kiev another chance.
"(We) give this chance to Ukraine to change its constitution, to change its attitude," Luhansk rebel leader Igor Plotnitsky said on Russian television. Donetsk rebel leader Alexander Zakharchenko said he will blame the Ukrainian government in Kiev if the ceasefire collapses and then there "will be no meetings and no new agreements."