KABUL — A planned prisoner swap between the Afghan government and the Taliban that was intended to restart peace talks between the insurgent group and the United States has been delayed, according to Afghan and Taliban officials.

The emergence of significant snags early on highlights the difficulty of getting the two sides back to the negotiating table. The Taliban has long refused to negotiate directly with the Afghan government.

The swap would have freed two university professors in exchange for three high-profile militants linked to the Taliban. President Ashraf Ghani announced the deal on live television last week, saying it would help bring “peace and stability” to Afghanistan.

The professors, Kevin King, a U.S. citizen, and Timothy Weeks, an Australian, have been held by the Taliban since August 2016, when gunmen ambushed their vehicle in central Kabul and abducted them.

The militants who were set for release are Mali Khan, Hafiz Rashid and Anas Haqqani, a younger brother of the Taliban’s deputy leader and son of the Haqqani network’s founder. They are being held in a government detention center at Bagram air base. (The Haqqani network is an insurgent group closely allied with the Taliban.)

But days after Ghani’s announcement, none of the prisoners have been released and the government and Taliban officials are trading blame.

Sediq Seddiqi, a spokesman for Ghani, blamed the Taliban for the delay, tweeting Saturday that the insurgents “failed to observe the conditions” of the swap and caused “the disruption of the exchange process.” He did not elaborate.

A spokesman for the Taliban blamed the United States. Zabiullah Mujahid said the agreement fell apart when the Taliban-linked militants were not transferred to a second location before they were to be flown out of Afghanistan to Qatar, where the Taliban has an office.

“The issue is pending,” Mujahid said by phone from an undisclosed location. “The Americans should be asked why they have not transferred our prisoners.”

John Bass, the U.S. ambassador to Afghanistan, declined to comment on the details of the proposed deal, but he tweeted his support for the delay and suggested it might be linked to recent attacks in Afghanistan that have killed civilians.

“We supported President Ghani’s announcement to release three #Taliban prisoners to promote #peace — and the decision to reassess their pending transfer following the attacks in #Logar and #Kabul on November 12 and 13,” Bass said in a tweet Sunday.

“Making #peace means making hard choices, but it also requires careful review of the conditions on the ground,” he wrote.

The exchange was long sought by U.S. special envoy Zalmay Khalilzad, who has been shuttling between Pakistan and Afghanistan for weeks to restart peace talks with the Taliban. Khalilzad was leading informal discussions focused on identifying confidence-building measures such as the prisoner swap to bring the United States and the Taliban back to the negotiating table.

Despite nearly a year of U.S.-Taliban negotiations and indications that a deal was imminent, the sides have struggled to resume talks since President Trump declared them “dead” in September.

It is not clear whether talks moving forward would pick up where the negotiators left off or begin from scratch. A draft peace deal included an agreement on the withdrawal of many American troops from Afghanistan in exchange for a Taliban pledge not to harbor terrorist groups.

King and Weeks were teaching English at the American University of Afghanistan, a private nonprofit institution in Kabul, when they were kidnapped close to its campus. Over the course of their captivity, concerns have mounted that their health is deteriorating. In October 2017, the Taliban issued a statement saying King suffered from heart and kidney disease and needed urgent medical attention.

Sharif Hassan and Sayed Salahuddin in Kabul and Haq Nawaz Khan in Peshawar, Pakistan, contributed to this report.