KABUL, Afghanistan — The Afghan government said that a repeatedly stalled prisoner swap with the Taliban had largely been completed on Thursday, potentially removing the final hurdle for direct negotiations with the insurgents to end the country’s long war.
Preparations have been underway for months in Doha, Qatar’s capital, for the two sides to meet there and begin negotiating an end to the war. But the Taliban refused to start those talks until the Afghan government released the last of 5,000 prisoners whom the United States had committed to freeing in a deal with the insurgents in February, and instead intensified its attacks across Afghanistan.
Javid Faisal, a spokesman for the Afghan national security council, said all but “a few” of the 400 remaining Taliban had been freed after the Taliban released Afghan commandos they had been holding.
The remainder are about a half-dozen prisoners who are said to have killed American, Australian and French citizens, and whose release the three countries lobbied to block — even as other American officials pushed the Afghans to speed up the freeing of prisoners.
But Afghan and Taliban officials suggested that a face-saving solution was in the works and that those prisoners were likely to be moved to Qatar for temporary house arrest.
“We expect direct talks to start promptly,” Mr. Faisal said.
The prisoner swap has been the most controversial part of a peace framework that the U.S. laid out with the Taliban in February, in talks that excluded the Afghan government. That agreement initiated the departure of the roughly 12,000 remaining American troops in Afghanistan over 14 months, in return for the Taliban’s committing to keeping Afghan territory from being used as a base for international terrorist attacks.
President Ashraf Ghani’s administration protested the terms of the deal, saying that its American allies had left the country vulnerable by negotiating away the two biggest points of leverage against the Taliban — the detention of insurgent prisoners and the presence of U.S. troops — without more assurances from the insurgents.
Now, the Afghan government is to sit down for what are sure to be complicated talks even as the American troop withdrawal is playing out. The two sides have profoundly different visions about the political process and human rights, and the negotiations will be clouded by grievances of a conflict that has dragged on for decades.
The Afghan government initially opposed the prisoner release, but relented after heavy pressure from the Trump administration, which sees the peace deal as a way out of the long and expensive war and as a boost for President Trump in the U.S. election in November.
The Afghan government, after releasing most of the 5,000 Taliban prisoners, balked at releasing the last 400 militants, who were accused in some of the worst attacks. But again, the government was cornered: The Taliban were cranking up violence on the one hand, killing dozes of Afghan forces daily, all while the United States was exerting pressure for the releases to be completed.
Mr. Ghani signed the release of the batch last month after consulting an assembly of 3,000 representatives from across Afghanistan. But new conditions came up. The Afghan government demanded that the Taliban set free more than 20 Afghan commandos captured when they walked into a bloody trap in eastern Ghazni Province in 2018.
Vice President Amrullah Saleh said on Wednesday that the Afghan government had begun releasing the remaining Taliban after receiving assurance that no more Afghan commandos would remain in insurgent detention.
But officials have publicly remained vague about how many of the roughly 22 commandos they got back from the Taliban before releasing the remaining insurgent prisoners. One senior Afghan official said that only 10 had been set free.