Still, the militants did not soften their position against negotiating with the Afghan government after Mr. Ghani arranged previous releases of imprisoned Taliban members to mark religious observances. And more broadly, the insurgents have given up very little over 10 months of negotiations with Mr. Khalilzad.
In fact, the peace process began with a major concession by the Trump administration: It agreed to a Taliban demand that Mr. Ghani’s government be excluded from the negotiations, deeply unsettling the Afghan government. That decision elevated the Taliban to an equal negotiating partner without requiring the militants to give up anything significant in return.
More recently, the United States has unilaterally reduced its troop numbers in Afghanistan by 2,000, potentially diminishing its leverage in any future negotiations with the Taliban.
Many Afghans criticized Mr. Ghani for freeing men they said were terrorists responsible for killing untold numbers of Afghan civilians. A survey of 19,000 Afghan Facebook users by Tolo News, an Afghan network, found that 82 percent disapproved of the deal, versus 18 percent who approved.
Separately, the father of two schoolchildren killed in the Nov. 13 car bombing criticized Mr. Ghani and the United States for the swap, saying the Taliban had killed his children.
“The Taliban kill people, and the Americans want to release them?” Abdul Saboor, 45, said in an interview at his home in Kabul on Sunday. Mr. Saboor was wounded and his daughter, Zainab, 10, and son, Hadis, 7, were killed in the bombing.
“It’s a risky move on his part,” Kate Clark, an analyst with the Kabul-based Afghanistan Analysts Network, said of Mr. Ghani. “It’s not clear why it has happened now or whether it will actually be what he said he hopes it will be — a confidence-building measure with the Taliban.”