“The reason for announcing it this time is that, after the Kabul administration announced theirs, the people were concerned that our Mujahedeen might continue operations and it might disturb their Eid celebrations,” Mr. Mujahid said. “We wanted them to be confident that we also won’t do any operations. But our announcement is unrelated to the Kabul administration’s.”

Overnight violence served as a reminder of how the deadly the war remains. In the Zawol district of western Herat Province, the governor’s spokesman said 18 members of the Afghan Army and police were killed in an overnight ambush on Friday. In private, officials in southern Kandahar Province said as many as 23 soldiers were killed in Shahwalikot district. The army, although confirming casualties, would not provide numbers. In the north, 11 members of the Afghan police were killed in Sar e Pul Province and 25 members of a pro-government militia in Kunduz Province.

Jarett Blanc, a former American diplomat who was involved in earlier efforts to start a peace process with the Taliban, said the cease-fire provides an opportunity for both sides to demonstrate control over their armed forces.

“One problem you always get in insurgencies and negations is ‘Who can I talk to? Who is in charge?’” Mr. Blanc said. “In Afghanistan, the Taliban genuinely doubt the government of Afghanistan’s ability to control the most important armed forces, which is ours.”

Conversations with diplomats and senior officials in Kabul suggest that the unilateral cease-fire announced by the government had not been coordinated with the Taliban or the outcome of a broader, cohesive peace effort.

Over the past few years, as the United States has drawn down from the peak of about 100,000 troops in Afghanistan, it has increasingly embraced a political settlement as the only end to the long Afghan war.

But just how that settlement could be negotiated has proved to be a difficult task, compounded by several factors, including the Taliban’s long, complicated relationship with the Pakistani military as a source of support; a weak interlocutor in the government in Kabul that’s marred by infighting; and the breakdown of consensus among regional players like Iran and Russia, who have stakes in an endgame in Afghanistan.