(CNN) Marathon peace talks aimed at ending the bloody crisis in eastern Ukraine concluded Thursday in a breakthrough: A ceasefire that's due to start Sunday and an agreement for both sides to pull back heavy weapons.

If the ceasefire holds -- which is far from certain -- it could end a 10-month conflict that has claimed more than 5,000 lives, many of them civilians, and plunged East-West relations to their lowest point since the end of the Cold War.

"We had just two options: bad, and worse. So we decided at this particular period of time to get the bad option. Probably this option will save the lives of Ukrainian soldiers, and I hope this option will save lives of Ukrainian civilians, of innocent people, who are under a constant shelling of Russian-led terrorists," Ukrainian Prime Minister Arseniy Yatsenyuk said.

"It's better to have this new deal rather than not to have (it). But we do not trust any words or any papers. We are to trust only actions and deeds," he said.

The White House issued a statement with a tone of guarded optimism. "The United States welcomes the agreement reached today in Minsk. ..." it said. "The agreement represents a potentially significant step toward a peaceful resolution of the conflict and the restoration of Ukraine's sovereignty."

Belarussian President Alexander Lukashenko, Russian President Vladimir Putin, German Chancellor Angela Merkel, French President Francois Hollande and Ukrainian President Petro Poroshenko.

The statement urged that all parties take "immediate, concrete steps" to fulfill their commitments. "Heavy weapons must be withdrawn from the conflict zone, and Russia must end its support for the separatists and withdraw its soldiers and military equipment from eastern Ukraine," the statement said.

Addressing reporters after the four-way overnight talks in Minsk, Belarus, Russian President Vladimir Putin said all parties had agreed to the ceasefire starting February 15 and called for restraint in the interim.

"I call on both sides to end the bloodshed as soon as possible" and come to a real political solution to the conflict, he said.

Putin said both sides have agreed to pull back heavy weapons. The talks between Russia, Ukraine, France and Germany took so long, he said, because authorities in Kiev still refuse to have direct contact with separatists.

German Chancellor Angela Merkel , speaking alongside French President Francois Hollande , said more work remained to be done, but "what we have on the table gives us great hope."

The agreement may not be perfect, she said, but it has provided a chance to improve matters in eastern Ukraine and is "clearly preferable to the situation if we had done nothing."

Merkel said Putin would be talking to separatist leaders about the deal. They were expected to travel to Moscow on Thursday to meet with Russian lawmakers.

Meanwhile, Ukrainian President Petro Poroshenko headed to Brussels, Belgium, to brief European leaders on the situation. Both Hollande and Merkel paid tribute to his efforts on behalf of Ukraine in the talks.

European Council President Donald Tusk said the agreement was "welcome news and gives hope" but that hope was not enough. "The real test is the respect of the ceasefire on the ground," he said.

He added that after speaking with Merkel, his feeling was "that we should remain extremely cautious."

Said one young man in Kiev, who recently signed up to fight pro-Russian rebels: "I don't believe in the agreement at all. We've signed agreements in the past and all of them were breached."

'We must give Ukraine this chance'

In a televised statement, two separatist leaders, Igor Plotnitsky, of the self-proclaimed Luhansk People's Republic, and Alexander Zakharchenko, of the self-proclaimed Donetsk People's Republic, indicated they supported the deal.

"We must give Ukraine this chance," said Plotnitsky, adding that the peace plan envisages constitutional reforms that will protect the rights of people in eastern Ukraine and change Kiev's approach.

Zakharchenko said any violations of the terms agreed to so far, with further talks still needed on some points, would mean no more deals. "All responsibility for any violation of the agreement is on Petro Poroshenko," he said.

A previous ceasefire deal, agreed to on September 19, also in Minsk, broke down amid continued fighting. It called for a drawback of heavy weapons, greater autonomy in the eastern Luhansk and Donetsk regions and a buffer zone along the Russia-Ukraine border.

The Kremlin released details of the new agreement, which is similar in part to the September deal, on its website, but it's still unclear how elements of it will work. The points include:

• An immediate and comprehensive ceasefire in parts of Donetsk and Luhansk starting at midnight on February 15.

• The withdrawal of all heavy weapons by both parties at equal distances in order to create a security zone width of at least 50 kilometers (31 miles) from each other for artillery systems and more for longer-range weapons. The ceasefire line for the Ukrainians is the current front line and for the separatists it's the front line as it was at the time of the previous deal on September 19.

• This process should begin no later than the next day after the ceasefire and should be over within 14 days.

• The Organization for Security and Cooperation in Europe, which has a monitoring team in Ukraine, will monitor the ceasefire line and withdrawal of heavy weapons.

• A dialogue on new local elections and the special status of the Donetsk and Luhansk regions will begin the day after the withdrawal.

• A law will be created to give amnesty to people involved in events in Luhansk and Donetsk.

• Both sides must ensure the release and exchange of all hostages and illegally held prisoners by no later than the fifth day after the withdrawal.

• Social payments such as pensions should be restored, and Ukrainian authorities should regain full control of the banking system in conflict-affected areas.

• Full control of the border will be restored to the Ukrainian government, beginning the day after local elections are held.

• Withdrawal of all foreign troops and military equipment from Ukraine, including mercenaries, and the disarmament of militia groups.

All-night session

German Foreign Minister Frank-Walter Steinmeier voiced cautious optimism after Thursday's deal, which came after 17 hours of talks.

JUST WATCHED Ambassador: Russia not sending troops to Ukraine Replay More Videos ... MUST WATCH Ambassador: Russia not sending troops to Ukraine 03:37

"We have not achieved everything, but at least there is a ceasefire. This also includes agreements on securing the eastern borders of Ukraine, elections and the exchange of prisoners," he said in a statement.

"It is a chance to move away from escalation and towards political momentum."

In a joint declaration, released by the German government, the four leaders stated "their full respect for the sovereignty and territorial integrity of Ukraine" and that they "firmly believe that there is no alternative to an exclusively peaceful settlement."

The leaders "will use their influence on relevant parties" to ensure the package of measures are put in place, the declaration said.

"Leaders share the conviction that improved cooperation between the EU , Ukraine and Russia will be conducive to the crisis settlement," it added.

To that end, the three parties will hold further talks on energy supply and a possible free trade deal between Ukraine and the European Union, which is of concern to Russia, it said.

Poroshenko: Ukraine will remain a united state

The question of Ukraine's territorial integrity and sovereignty was a key issue going into the talks.

Russia annexed its southeastern Crimea region last spring, shortly before separatists in the Donetsk and Luhansk regions declared their independence from Kiev, triggering months of conflict.

"Ukraine will always be a unitary state. No federalization whatsoever! #UnitedForUkraine," Poroshenko tweeted after the deal was announced.

In a post on his Facebook page, he said that "we did not agree to a single ultimatum" and that the ceasefire would be implemented regardless of any previous agreements.

Photos: Crisis in Ukraine Photos: Crisis in Ukraine Ukrainian security forces patrol in the village of Bobrovyshche on July 14, 2015. More than 6,400 people have been killed in the conflict in Ukraine since April 2014, the United Nations says. Hide Caption 1 of 49 Photos: Crisis in Ukraine Ukrainian security forces on the lookout in Bobrovyshche on July 14. The country's troops face daily attacks from Russian-backed separatists despite a ceasefire being in place. Hide Caption 2 of 49 Photos: Crisis in Ukraine A man with a machine gun is among the Ukrainian troops standing guard in Krimskoe town of Luhansk, Ukraine, on June 25. Hide Caption 3 of 49 Photos: Crisis in Ukraine Shelling between Ukrainian troops and pro-Russian rebels leaves damage in Donetsk, Ukraine, on Monday, June 1. Hide Caption 4 of 49 Photos: Crisis in Ukraine A Ukrainian serviceman fires a grenade launcher on the front lines near Donetsk on Saturday, May 30. Hide Caption 5 of 49 Photos: Crisis in Ukraine Pro-Russian rebels carry the coffin of prominent separatist commander Alexei Mozgovoi during his funeral in Alchevsk, Ukraine, on Wednesday, May 27. Hide Caption 6 of 49 Photos: Crisis in Ukraine An American soldier, right, trains Ukrainian troops on Tuesday, April 21, near Yavoriv, Ukraine. Operation Fearless Guardian, a six-month training exercise, involves about 300 members of the American 173rd Airborne and about 900 Ukrainian National Guard troops. Hide Caption 7 of 49 Photos: Crisis in Ukraine Residents flee with salvaged belongings during renewed fighting in the Jabunki neighborhood near the airport in Donetsk on Monday, April 13. Hide Caption 8 of 49 Photos: Crisis in Ukraine A mortar round sticks out of the ground near a destroyed tank at a former Ukrainian army checkpoint outside Chornukhyne, Ukraine, on Monday, March 2. Russian-backed separatists had recently overran the area. Hide Caption 9 of 49 Photos: Crisis in Ukraine An instructor of the Ukrainian volunteer Azov Battalion conducts training exercises in Kiev, Ukraine, on Sunday, March 1. Hide Caption 10 of 49 Photos: Crisis in Ukraine A woman makes her way across a bridge destroyed in heavy fighting in Donetsk, Ukraine, on March 1. Hide Caption 11 of 49 Photos: Crisis in Ukraine A volunteer gives humanitarian aid to residents of Popasna, Ukraine, on Saturday, February 28. Hide Caption 12 of 49 Photos: Crisis in Ukraine A Ukrainian serviceman climbs out of a tank at a checkpoint near Horlivka, Ukraine, on Monday, February 23. Hide Caption 13 of 49 Photos: Crisis in Ukraine A member of a Ukrainian military medical unit cries during a ceremony in Artemivsk, Ukraine, on February 23. Four of his comrades were killed near Debaltseve, Ukraine. Hide Caption 14 of 49 Photos: Crisis in Ukraine A man holds a Ukrainian flag as he covers a victim of an explosion in Kharkiv, Ukraine, on Sunday, February 22. The explosion during a peaceful protest left two dead and 15 wounded. Hide Caption 15 of 49 Photos: Crisis in Ukraine Pro-Russian rebels stationed in Horlivka launch missiles on Wednesday, February 18. Hide Caption 16 of 49 Photos: Crisis in Ukraine Pro-Russian separatists take position near Uglegorsk, Ukraine, on February 18. Hide Caption 17 of 49 Photos: Crisis in Ukraine An army ambulance damaged in recent shelling lies by a road near Svitlodarsk, Ukraine, on Sunday, February 15. Hide Caption 18 of 49 Photos: Crisis in Ukraine Ukrainian servicemen play with a soccer ball on a road between Svitlodarsk and Debaltseve on February 15. Hide Caption 19 of 49 Photos: Crisis in Ukraine A woman salvages items February 15 from the rubble of a destroyed clinic where she had worked in Opytne, Ukraine. Hide Caption 20 of 49 Photos: Crisis in Ukraine People carry a refrigerator through a balcony at an apartment building that was damaged in recent shelling in Svitlodarsk on February 15. Hide Caption 21 of 49 Photos: Crisis in Ukraine A recent ceasefire was brokered during marathon talks in Minsk, Belarus. From left, Belarusian President Alexander Lukashenko, Russian President Vladimir Putin, German Chancellor Angela Merkel, French President François Hollande and Ukrainian President Petro Poroshenko gather before negotiations begin on Wednesday, February 11. Hide Caption 22 of 49 Photos: Crisis in Ukraine People stand beside the body of a woman killed during shelling in Kramatorsk, Ukraine, on Tuesday, February 10. Hide Caption 23 of 49 Photos: Crisis in Ukraine A volunteer gets a medical checkup at a military base for pro-Russian rebels February 10 in Donetsk, Ukraine. Hide Caption 24 of 49 Photos: Crisis in Ukraine Ukrainian volunteer fighters and policemen arrest two men in Kiev, Ukraine, on February 9. The men allegedly arrived from Donetsk and were suspected of participating in pro-Russian rebel activities and organizing terrorist attacks in the Ukrainian capital. Hide Caption 25 of 49 Photos: Crisis in Ukraine Residents unload humanitarian aid in Debaltseve on Friday, February 6. Hide Caption 26 of 49 Photos: Crisis in Ukraine A man rides a bicycle in Vuhlehirsk, Ukraine, on February 6. Hide Caption 27 of 49 Photos: Crisis in Ukraine A child waits on a bus to leave Debaltseve on Tuesday, February 3, after increased fighting in the region. Hide Caption 28 of 49 Photos: Crisis in Ukraine A man stands next to his car in Donetsk on Sunday, February 1, after it was destroyed by shelling. Hide Caption 29 of 49 Photos: Crisis in Ukraine The body of a civilian killed during shelling lies on the ground in Donetsk on Friday, January 30. Hide Caption 30 of 49 Photos: Crisis in Ukraine People in Mariupol, Ukraine, pour soil into the grave of a recent shelling victim on Monday, January 26. Hide Caption 31 of 49 Photos: Crisis in Ukraine Ukrainian servicemen prepare ammunition at a position on the front line near Mariupol on January 26. Hide Caption 32 of 49 Photos: Crisis in Ukraine A man injured during shelling in Mariupol sits in an emergency hospital on January 26. Hide Caption 33 of 49 Photos: Crisis in Ukraine A piece of an exploded missile sits lodged in the ground outside an apartment building in the Vostochniy district of Mariupol on Sunday, January 25. Hide Caption 34 of 49 Photos: Crisis in Ukraine A resident walks by a burning building in Mariupol on Saturday, January 24. Hide Caption 35 of 49 Photos: Crisis in Ukraine A pro-Russian rebel takes cover from shelling in the Kievsky district of Donetsk on Thursday, January 22. Hide Caption 36 of 49 Photos: Crisis in Ukraine People in downtown Donetsk react as Ukrainian prisoners of war are handed over by pro-Russian rebels on January 22. Hide Caption 37 of 49 Photos: Crisis in Ukraine A trolleybus is damaged in Donetsk's Lenin District after its station was hit by a shell on January 22. Hide Caption 38 of 49 Photos: Crisis in Ukraine A rebel takes aim while protecting a supply position in the Kievsky district of Donetsk on January 22. Hide Caption 39 of 49 Photos: Crisis in Ukraine Rubble and debris cover the airport in Donetsk on Wednesday, January 21. Hide Caption 40 of 49 Photos: Crisis in Ukraine Hide Caption 41 of 49 Photos: Crisis in Ukraine Vladimir Bovrichev cries next to the body of his 4-year-old son, Artiam, during Artiam's funeral on the outskirts of Donetsk on Tuesday, January 20. The boy was killed during a Ukrainian artillery strike. Hide Caption 42 of 49 Photos: Crisis in Ukraine Women sit in a shelter during a battle in Donetsk on Sunday, January 18. Hide Caption 43 of 49 Photos: Crisis in Ukraine A building hit by Ukrainian artillery is seen in the Voroshilovsky area of Donetsk on January 18. Hide Caption 44 of 49 Photos: Crisis in Ukraine Men from the Azov Volunteer Battalion board a bus in Kiev to join the fight against the rebels on Saturday, January 17. Hide Caption 45 of 49 Photos: Crisis in Ukraine Rebels sit atop a tank at a checkpoint north of Luhansk, Ukraine, on Wednesday, January 14. Hide Caption 46 of 49 Photos: Crisis in Ukraine A Ukrainian soldier looks down from a military truck at the Donetsk airport on Tuesday, January 6. The airport has been the scene of some of the fiercest fighting in eastern Ukraine. Hide Caption 47 of 49 Photos: Crisis in Ukraine Ukrainian President Petro Poroshenko gives a speech as he hands over new military equipment to forces near the city of Ghytomyr, Ukraine, on Monday, January 5. Hide Caption 48 of 49 Photos: Crisis in Ukraine A Ukrainian volunteer fighter fires a machine gun at pro-Russian rebels near the village of Pisky, Ukraine, on Saturday, January 3. Hide Caption 49 of 49

"For the successful reform we need just one precondition: peace. And we tried to do our best to make Ukraine a successful state, peaceful, reliable with a very strong European aspiration," the Ukrainian president later told reporters in Brussels.

The German- and French-led peace initiative was prompted by worsening fighting between separatists and Ukrainian government forces in recent weeks, threatening not only the lives of more civilians, but the stability of the region.

CNN's Nick Paton Walsh in the Donetsk region said separatist fighters that his team spoke to had learned of the ceasefire deal from CNN -- and were highly skeptical of any promises made.

The noise of shelling could still be heard Thursday, and there was no obvious change in the tempo of the combat, he said.

A separatist fighter who spoke to CNN in Dukuchayevsk, not far from Donetsk city, said: "Ukrainians won't have a ceasefire. Ukraine armed forces, I mean. We can resolve this conflict only one way: Ukraine withdraws its armed forces from the territory of the Donetsk Republic. That's the only possible way."

"How can we talk to them?" asked another fighter. "Only with this," he said, slapping his weapon.

It's possible the separatists may seek to seize further territory before Sunday. Since the Ukrainian forces have to withdraw their weapons from the current front line as the ceasefire comes into effect, the separatists stand to keep hold of significant territory they've won in recent weeks.

A spokesman for the National Defense and Security Council of Ukraine told CNN on Thursday that two Ukrainian soldiers had been killed and 21 injured in the past 24 hours. Russian tanks, rocket launchers and armored personnel carriers had also crossed the border from Russia into Ukraine overnight, he said.

Russia has steadfastly denied accusations that it is sending forces and weapons into Ukraine. But top Western and Ukrainian leaders have said there isn't any doubt that Russia is behind surging violence and separatists' efforts to take over territory in eastern Ukraine.

IMF: New $17.5 billion program for Ukraine

Meanwhile, International Monetary Fund director Christine Lagarde on Thursday announced a new IMF bailout package that's worth $17.5 billion over the next four years. It has still to be approved by the board of directors.

"Over the past year, despite the challenging environment, the Ukrainian authorities have clearly shown their commitment to ambitious reform on several key fronts," Lagarde said.

These include strong fiscal discipline and moves to strengthen anti-corruption measures.

The deal replaces a separate $17 billion bailout agreed to last year by the IMF. Only $4.5 billion of those funds were distributed, bringing the IMF's total commitment to $22 billion.