MOSCOW — After two days of hard negotiations, four European leaders have agreed on a cease-fire deal in eastern Ukraine, Russian leader Vladimir Putin announced Thursday.

Ukrainian President Petro Poroshenko, French President Francois Hollande, German Chancellor Angela Merkel and Putin worked nonstop for seven hours Wednesday and for a few more hours Thursday before they arrived at a compromise to stop the violence.

“We agreed on a cease-fire that takes effect Sunday,” Putin said in a televised statement after the talks in Belarus’ capital of Minsk. “The second position which I think is of extreme importance is the withdrawal of heavy weaponry from the current front line for Ukrainian troops and the demarcation line agreed upon in the Sept. 19 Minsk agreements for the Donbass armed forces.”

Two regions of Donbass engulfed by the armed conflict will get wider special powers in the course of a constitutional reform yet to be conducted in Ukraine.

The Russian leader complained that the night of the talks was “not the best night of my life.”

Alexander Zakharchenko, leader of the self-proclaimed Donetsk People’s Republic, warned that pro-Russia separatists will agree to no more peace deals should the new cease-fire be violated by Kiev.

“There will be no new meetings and memorandums in case of violations,” Zakharchenko said, quoted on a separatist website. “All responsibility for any violations of the memorandum provisions will lie on Poroshenko.”

Many Ukrainian politicians met the cease-fire news with restraint.

Poroshenko did his best in Minsk and accomplished a lot but the deal still appeared shaky, a Ukrainian lawmaker and former prominent commander said.

“We must remember that we are dealing with terrorists who violated all the previous cease-fire agreements many times,” Yuri Bereza, a former commander of Dnipro-I militia regiment, said in an interview with The Times.

“This deal can be successfully implemented only if Russia really withdraws its weaponry and troops from the east and we get control of the vast state border sections we are not controlling now.”

The signed agreement provides for Ukraine to get full access to those border sections currently under control of the separatists only after new local elections are held.

The agreement also provides for all “foreign troops and weaponry” to be withdrawn from Ukrainian territory.

Poroshenko said that he didn’t accept the Kremlin demand that Ukraine should become a federation of regions rather than a single state.

“The expanding of powers for Ukraine’s regions will proceed with the framework of constitutional changes aimed at decentralization,” Poroshenko was quoted as saying on the official presidential website Thursday. “We haven’t accepted a single compromise aimed at federalization.”

According to the agreement, all hostages and POWs on both sides of the conflict should be released within 19 days.

Ukrainian pilot and lawmaker Nadezhda Savchenko, held in a Moscow prison and charged with complicity in the June killing of two Russian television reporters, will be set free according to an agreement with Moscow, Poroshenko said in Minsk.

Ukrainian authorities have long argued that Savchenko was smuggled across the border and illegally held in Russian custody. Savchenko is reportedly on a hunger strike in Moscow’s Sailor’s Silence prison hospital.

The 10-month conflict, which started after Russia annexed the Crimean peninsula in March, has claimed more than 5,350 lives and displaced about 1 million people fleeing the violence and seeking refuge in other regions of Ukraine, Russia or elsewhere, the U.N. said this month.

As the fighting continued in eastern Ukraine, two Ukrainian soldiers were killed and 21 wounded in the last 24 hours, the National Defense and Security Council reported Thursday on its website.

Special correspondent Victoria Butenko contributed to the report from Kiev.

©2015 Los Angeles Times