LEBEDINSKOYE, Ukraine — The cease-fire between the Ukrainian government and Russian-backed separatists appeared in danger Saturday after just a day as several artillery barrages resumed around the city of Mariupol.

Soldiers and civilians who have been enduring life on the front lines said they doubted that the cease-fire, which came into effect on Friday, would hold after five months of warfare.

The sound of artillery strikes were heard late Saturday on the edge of Mariupol, which Ukrainian forces have been in danger of losing, according to reporters in the city. The barrages started around midnight, but later stopped. It was not immediately clear who had been responsible for the shelling, but some reports, which could not be independently confirmed, suggested that Ukrainian government positions had come under attack. The official Twitter account of the pro-Russian rebels said fighting was underway in Mariupol and that rebel positions had come under fire. Nevertheless, a prisoner exchange was going ahead at dawn, another Twitter post said, referring to one of the terms of the cease-fire agreement.

Despite assurances from President Petro O. Poroshenko that the agreement would keep Ukraine whole, there has been concern in Ukraine that Russia, after using its army to deal a military blow against Ukrainian troops, was dictating terms that would keep a significant portion of the country under its sway. It will largely be up to Mr. Poroshenko — who was elected in May on a platform of ending the war in two weeks and who faces parliamentary elections on Oct. 26 — to rapidly convince Ukrainians that negotiating with the separatists was their best choice.