With the arrival, last night, of Eid al-Fitr, commemorating the end of the month of Ramadan, at least some of the guns and bombs ravaging Afghanistan are meant to fall silent. A week ago, Afghan President Ashraf Ghani announced that his government’s security forces would observe, from the start of Eid, a unilateral eight-day cessation of hostilities toward the Taliban, although not toward Al Qaeda or the local branch of the Islamic State. The United States military commander in Afghanistan announced that U.S. forces would join this short suspension. Afghan and U.S. leaders then called on the Taliban to reciprocate, and, a few days later, the group announced that it would do so, partially; it pledged a three-day ceasefire overlapping with the one announced by Kabul. The Taliban’s ceasefire excluded “foreign forces,” but this is the first time the movement has declared any kind of formal ceasefire since the fall of its government, the Islamic Emirate of Afghanistan, in late 2001.

In the midst of the long-stalemated, increasingly violent Afghan war, marked this year by a succession of horrible attacks against civilians in Kabul, including one in which an ambulance delivered a huge bomb and another that targeted Afghan journalists, these ceasefires, even if they are fully adhered to (which seems unlikely), look like small gestures. Yet they have meaning. The Taliban’s first-ever national ceasefire declaration offers a policy change that suggests the possibility of longer, more significant armistices to be achieved through future negotiations. And the call-and-response of proposals between Ghani’s government and the Taliban’s leadership suggests that secret backchannel confidence-building negotiations have resumed. Typically, in the past, the Taliban’s posture has been that, since the Kabul government is an illegitimate puppet of the West, it deserves none of the movement’s engagement or attention away from the battlefield. Now the Taliban has publicly replied to an olive branch extended by Ghani.

This is by no means the first ceasefire to play a role in the war. What makes it unusual is its national, formally declared character. Previous ceasefires have generally been local and undeclared. For many years, Afghan security forces and local Taliban commanders, when they have not been shouting insults and taunts at one another over their battlefield radio sets, have negotiated all manner of informal, undocumented standstills to participate in commerce, or to respect kinship ties, or because poorly compensated local combatants find that they share disdain for the agendas of their distant, privileged military superiors.

These sorts of locally negotiated, ad-hoc agreements have always been part of war. One of the most famous of the past century was the “Christmas Truce” of 1914, during the inaugural year of the First World War. The mythologized version holds that, as the holiday approached, German troops in trenches in Belgium sang carols, soon answered by English soldiers across the mud. The mutual feeling—and the silencing of guns—spread widely, although scholars continue to study and debate the scale and the meaning of that event. Of course, as an indicator of the First World War’s trajectory, that temporary expression of shared humanity was, to put it mildly, a false signal.

In the pursuit of political settlements of civil wars, temporary ceasefires are not a basis for a lasting peace, but neither are they irrelevant. Tactical reductions in battlefield violence can be especially helpful in conflicts when there is a genuine interest among combatants in reducing the destabilizing violence and the human cost of war, but the parties have no realistic, immediate path to a lasting peace. In these cases, antagonists sometimes use ceasefires as a violence-management tool, to buy time for negotiations to evolve or to protect civilians from the ravages of a stalemated conflict.

For example, since 1971, when India and Pakistan agreed on an armistice to conclude the third major war between them since partition, their troops have been facing one another along Kashmir’s so-called Line of Control, a ceasefire border. During certain periods, the troops have shelled and shot at one another mercilessly. At other times, particularly when the two capitals were probing possibilities of a strategic détente, the guns have quieted. The villagers on both sides of the L.O.C. have been grateful for those interludes. No student of Kashmir would predict that India and Pakistan will fully resolve their seven-decades-old conflict soon. Yet the last time they came close to a strategic détente, the Line of Control was as quiet as it has ever been. That was no coincidence. Peace on the front lines reinforces confidence in capitals about the possibility of a durable political settlement, and vice versa.

Israel, surrounded by militias and states that do not accept its right to exist, has been particularly adept at using ceasefires or covertly negotiated limited war to advance its perceived interests. After its catastrophic invasion of Lebanon, in 1982, and the emergence of Hezbollah soon thereafter, Israel had to manage the presence of a revolutionary Shiite Islamic movement on its northern border, one armed with rockets that could devastate Israeli villages and towns. Hezbollah saw itself as an unyielding resistance force, bent on destroying Israel’s statehood; the possibility for a permanent peace between the combatants, then as now, was nonexistent. Nonetheless, during the nineteen-nineties, aided by backchannel negotiations, principally carried out by intelligence operatives, Israel and Hezbollah agreed, without a formal treaty, on what became known as “the rules of the game.” The essential principle was to manage the antagonists’ hot-and-cold military confrontation in a way that would protect civilians in both northern Israel and southern Lebanon. As Augustus Richard Norton, who has written a history of Hezbollah, describes the arrangement, “Israel would not attack civilian targets in Lebanon, and the resistance would focus its action on the Security Zone,” a demarcated area along the Israel-Lebanon border. One version of this accommodation, negotiated during the first term of the Clinton Administration, was “committed to an unsigned piece of paper,” Norton reports. Surveying a decade of such accords, he observes, “One measure of the importance of the accepted rules was that both Israel and Hezbollah apologized for actions that fell outside the rules.”

Negotiated limited war and declared ceasefires can have unanticipated political consequences. (This is also true of unconstrained violence during war.) In the case of Lebanon, Hezbollah’s ability to successfully manage the dilemmas of its unwinnable revolutionary war against Israel helped to create space for the movement to gradually enter and even dominate Lebanon’s constitutional politics. Israel and Hezbollah fought a short war in 2006, and they may be due for another escalation soon. But, for three decades, the “rules of the game” have strengthened both sides within their domestic political settings. And, thanks to the mutual deterrence and negotiated restraint, a generation of northern Israeli and southern Lebanese families have watched their children grow up under an insecure but mostly reliable peace, go to school, come of age, and start families of their own.

In Afghanistan, the Lebanon-like possibilities are intriguing. President Ghani has offered an expansive road map for a comprehensive peace settlement with the Taliban, but the obstacles to a grand bargain anytime soon between Kabul and the Taliban are enormous. During the Obama Administration, as I chronicled in my recent book “Directorate S,” American and Taliban negotiators undertook highly secret negotiations that sought to build confidence in anticipation of a comprehensive peace settlement that would allow the Taliban to enter constitutional Afghan politics and, perhaps, allow U.S. forces to leave the country. The talks failed for a number of reasons; one was that the grandiosity of the ambition was premature. Pakistan’s military leaders argued all along for a more step-by-step, “rules of the game”-type approach. Since the Taliban’s sanctuary in Pakistan is a central reason that the Afghan war has proved intractable, engaging Pakistan is essential to reducing the war’s violence or to altering its trajectory. Another factor that might reinforce such an effort is the Taliban’s need to confront its new rival, the Islamic State; in this phase of the war, the Afghan government and the Taliban have a common enemy.