All the pieces appeared in place. Afghan and American officials had concluded negotiations on a security agreement, defining the landscape for a continued yet limited U.S. military presence in Afghanistan. Both sides recognized the value of the accord, a logical next step, American forces serving as an investment that would help solidify gains and maintain stability in governing. Both sides appeared ready to sign.

Then Hamid Karzai had other ideas. The Afghan president surprised diplomats and others by refusing to sign before the end of the year. He has called for further talks, signaling his interest in signing after the Afghan elections in the spring. He took his stand as the loya jirga, an assembly of roughly 2,500 Afghan leaders, gathered to debate and vote on the agreement.

The assembly ratified the pact, anyway, and urged Karzai to sign soon. Susan Rice, the White House national security adviser, traveled to Kabul to reinforce the message, arguing that the American and NATO forces needed time to plan for the new mission, coinciding with the withdrawal of most allies’ troops next year. Karzai then upped his demands, adding the release of all inmates at the Guantanamo prison to his call for ceasing all raids on Afghan homes.

In a way, none of his actions is surprising. Karzai has a penchant for such dramatics, looking to play the local political angles, stressing his independence, taking such a stand even though he agreed to allow American forces to conduct raids in pursuit of high-profile insurgents. Perhaps, as some diplomats and analysts suggest, Karzai is looking to preserve his own leverage and avoid the status of lame duck.

Whatever the motivation, Karzai has run counter to the views of the loya jirga, its support reflecting an understanding about the important role American forces will play. Without their presence, conditions easily could unravel, among other things, international aid departing, Afghan security forces fracturing, even the Taliban reclaiming ground. The progress made by Afghan women could quickly be at risk.

The United States doesn’t have to remain, with other paths to serving its interests in the region. Still, it makes sense to be there, the mission in Afghanistan from the start fraught with barriers and complexities, yet now Washington with a stake in something better rather than worse, starting with a less fertile ground for Islamic extremists.

So, yes, both countries have a substantial interest in a limited presence of American forces, and that is what the security agreement achieves. Now the accord awaits the signature of Hamid Karzai, the question hovering: Will he sign sooner or later?