An internationally agreed ceasefire due to start Saturday tonight in eastern Ukraine is under threat from intense fighting and disputes between Kiev and Russian-backed separatists over the terms of the deal.

The militants are attempting to surround thousands of Ukrainian troops at Debaltseve, a key railway junction – pounding the them with artillery and tank attacks that Kiev and the United States claim involve units of the Russian military.

“All parties must show complete restraint in the run-up to the Sunday ceasefire, including an immediate halt to the Russian and separatist assault on Debaltseve and other Ukrainian towns,” said US state department spokeswoman Jen Psaki.

Rocket fire killed several soldiers and civilians, a day after Ukrainian, Russian, German and French leaders agreed terms for a ceasefire to start at midnight (Saturday night/Sunday morning).

The deal aims to create a 50km buffer zone between government and separatist forces, monitored by international observers, and to resolve the conflict through constitutional reform that would give Ukraine’s regions broad autonomy.

The pact – agreed in the Belarusian capital, Minsk – has come under strong criticism in Ukraine, however, with many accusing president Petro Poroshenko of capitulating to the rebels and Russia.

They say the deal is doomed because it foresees Russia allowing Ukraine to retake control of its eastern border only once the insurgents declare themselves satisfied with the constitutional changes and local elections – allowing them to keep the frontier open and receive Russian military help for as long as they like.

“I don’t want anyone to have any illusions and so I am not seen as a naive person – we are still a very long way from peace,” Mr Poroshenko said. “Nobody has a strong belief that the peace conditions which were signed in Minsk will be implemented strictly.”

Intense fighting is likely to continue around Debaltseve, with the insurgents demanding that government forces in the area surrender and Kiev insisting its units are not surrounded and will not give up.

“The risk is really very high,” said Gernot Erler, an adviser on Russia to German chancellor Angela Merkel.

“In the final hours before the ceasefire there is a danger that both sides will try to increase each other’s losses.”

There is also discontent in the ranks of Ukraine’s large volunteer battalions at the prospect of ceasing fire and retreating to create the buffer zone – a move they believe will invite the separatists to seize more territory.

“With the Russian Federation and (president Vladimir) Putin no deal is possible, because they will never stick to it,” said Dmytro Yarosh, leader of prominent nationalist political party and battalion Right Sector.

“Right Sector considers any deal with pro-Russian terrorists to have no legal power . . . So if the Ukrainian armed forces receive an order to withdraw heavy equipment and artillery and cease fire, Right Sector reserves the right to continue military actions . . . until Ukrainian lands are fully liberated from Russian occupation.”

The Minsk deal is also wobbling due to disagreement over its terms, such as the scope of an amnesty for those accused of crimes in the conflict zone.

Mr Poroshenko claimed agreement had been reached in Minsk for Moscow to free Nadiya Savchenko, a Ukrainian pilot captured by the militants but now held in Russia on suspicion of involvement in the death of two journalists; Russian officials insist that she will not be freed immediately and that a court must decide her fate.

Media in Canada reported that the country would share satellite data with Ukraine to help it monitor its border and observe the planned ceasefire.