KABUL, Afghanistan — The Taliban freed two Westerners they had held for more than three years on Tuesday, in exchange for the release of three senior insurgent leaders, officials said, in a deal that officials hoped could pave the way for Afghan peace talks with the Taliban.
The Westerners were released to American forces by the Taliban, and included an American, Kevin C. King, 63, and an Australian, Timothy J. Weeks, 50, teachers at the American University in Kabul who were abducted in 2016. The key figure being returned to the Taliban is Anas Haqqani, the younger brother of the Taliban’s military operations leader and a leading fund-raiser and propagandist before he was captured in 2014.
The exchange was brokered, in part, by the American peace envoy, Zalmay Khalilzad, who had earlier negotiated a tentative agreement with the Taliban that would have included terms of an American troop withdrawal. But those talks were abruptly aborted by President Trump in September.
Now, the prisoner exchange could be a step toward restarting talks between the United States and the Taliban, who have said they will stand by the terms negotiated with Mr. Khalilzad.
In announcing that he was willing to free the senior Taliban figures, President Ashraf Ghani said last week that the exchange was intended to “facilitate direct peace negotiations” between the Afghan government and the Taliban. He is also betting that the exchange could nudge the Taliban toward agreeing to at least a partial cease-fire, which Mr. Ghani has set as a precondition to any talks.
The Taliban have refused to negotiate with Mr. Ghani’s government until the United States reaches a troop withdrawal deal with the insurgency.
Mr. Ghani, who called the swap a “tough but important” decision, has emphasized that the release of the Western hostages was required as a show of good faith by the Taliban in advance of any peace negotiations.
A senior Trump administration official, speaking on condition of anonymity, said the two Westerners were released to American Special Operations forces in eastern Afghanistan early Tuesday afternoon and appeared to be in fair health.
The three Taliban prisoners were flown to Doha, Qatar, as part of a highly choreographed exchange that was to be completed within two days, officials said. The Taliban maintain a political office in Doha.
Also to be included in the exchange were 10 members of the Afghan security forces being held by the Taliban, Afghan and American officials said. Confirmation of their release was to be the trigger for the final release of the Taliban figures in Doha, the American official said.
In addition to Mr. Haqqani, the Afghan government was to release Hafiz Abdul Rashid, a senior Taliban commander who had equipped suicide bombers, chosen their targets and moved them from safe houses in Pakistan into Afghanistan. Mr. Rashid, a brother of a member of the Taliban negotiating team in Doha, was captured along with Mr. Haqqani in 2014.
The third Taliban member in the exchange was Hajji Mali Khan, a senior commander and an uncle of the deputy leader of the Taliban.
The three men are members of the Haqqani network, a brutal wing of the Taliban based in Pakistan’s tribal areas along the border with Afghanistan. The group has been responsible for suicide bombings against Afghan civilians, as well as attacks on Afghan and American forces.
Anas Haqqani’s release was important to the militants, in part, because his father, Jalaluddin Haqqani, founded the Haqqani network, where Anas Haqqani was considered a rising star.
Recovering American hostages held overseas has been a priority for Mr. Trump, and his national security adviser, Robert C. O’Brien, was previously the State Department’s top official for managing hostage cases. In this case, the failing health of Mr. King gave an urgency to the prisoner negotiations.
Mr. King was the last known American to be held by the Taliban. Another American who disappeared in Afghanistan, Paul E. Overby Jr., is believed to be dead. Mr. Overby disappeared in Khost Province in May 2014 while trying to interview the leader of the Haqqani network.
American officials said the Afghan government and the United States had delayed the swap after two attacks within 24 hours of Mr. Ghani’s initial announcement of the deal on Nov. 12.
That day, an American convoy was struck by a suicide car bomb in Logar Province in eastern Afghanistan; the American military command said there were no American casualties. On Nov. 13, a suicide car bomb attack in Kabul killed 12 civilians, including three children walking to school.
Mr. Khalilzad told Taliban leaders they needed to show good faith by ceasing such attacks, the officials said. When the Taliban blamed local militants, Mr. Khalilzad told them to establish command and control or put him in touch with someone who could, the American officials said.
A Taliban spokesman, Zabihullah Mujahid, blamed the United States for the delay, saying the three Taliban prisoners had not been delivered at the time and place agreed upon.
In a 2017 statement, the Taliban said Mr. King had heart and kidney problems. In one of two videos of the hostages the militants released, Mr. Weeks pleaded with Mr. Trump: “If we stay here for much longer, we will be killed. I don’t want to die here.”
Shortly after the teachers were abducted in August 2016, Navy SEAL team members attempted to rescue them from a remote compound in eastern Afghanistan but missed them by just hours, officials said. A second rescue attempt, in April, also failed, officials said.
Now, in surrendering three men responsible for killing Afghan civilians and troops, Mr. Ghani risked playing his strongest card against the Taliban with no guarantee that the exchange would lead to his ultimate goal of direct peace talks.
He has already faced criticism from some in the Afghan public, and accusations of being strong-armed by the United States into securing the release of two Westerners ahead of other Afghan priorities. The inclusion of the 10 Afghan security force members in the deal could mitigate some of that criticism.
The deal also comes at a pivotal political moment, with Mr. Ghani embroiled in a divisive presidential election marred by vote-counting delays and charges of ballot-stuffing and voting fraud. The announcement of preliminary election results has already been delayed for weeks.
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.”
In freeing two Westerners and 10 Afghan security force members, the Taliban are surrendering captives who don’t hold the same strategic or security value as the three Taliban figures. Nor have the Taliban made any public comments regarding agreeing to negotiations with the government in response to the prisoner swap.
The Taliban leadership has suggested that other prisoner exchanges could follow, but that has not been confirmed by the Afghan government.
Mr. Ghani stressed that the prisoner deal was reached in consultation with the United States, raising the possibility that the Americans gave assurances that the swap would improve chances for negotiations. A spokesman for the American Embassy in Kabul declined to comment.
In an interview with Tolo News, the American ambassador, John Bass, said last week, “This is the latest in a series of courageous steps that President Ghani and the Afghan government have taken to respond to the Afghan peoples’ overwhelming desire for peace.”
Just last month, Mr. Ghani’s spokesman said that releasing Mr. Haqqani was a “red line” that would not be crossed without the approval of the Afghan people. But last week, the spokesman, Sediq Sediqqi, said the decision to make the swap “was taken in the light of national interests.” And he said it could make “a path for an honorable peace and ending the war.”
Any failure to move toward peace talks has painful consequences for Afghan civilians, who suffered more than 8,200 deaths and injuries in the first nine months of this year, the United Nations reported.
Ms. Clark, the analyst, said the prisoner swap could prove worthwhile if it led to a reduction in violence.
On the other hand, she added: “Will letting these three out increase the capacity of the Haqqani network?”
David Zucchino reported from Kabul, Afghanistan, and Adam Goldman from Washington. Reporting was contributed by Taimoor Shah from Kandahar, Afghanistan, and Fahim Abed and Fatima Faizi from Kabul.