Afghanistan is to release three high-ranking Taliban prisoners in exchange for two hostages held by the group, President Ashraf Ghani has said.
American Kevin King and Australian Timothy Weeks were lecturers at the American University of Afghanistan when they were kidnapped in 2016.
Anas Haqqani, a leading figure in the Haqqani militant group, and two other senior commanders are part of the deal.
It is unclear how or when the exchange of prisoners will take place.
“In order to pave the way for face-to-face negotiations with the Taliban, the government has decided to free Taliban prisoners in exchange for two university professors,” Mr Ghani said in a televised speech.
The Taliban, who have long refused to negotiate with Mr Ghani’s administration, are yet to respond to the announcement.
The two professors were ambushed by gunmen and taken from a vehicle while leaving their university campus in Kabul in August 2016.
The pair then appeared in a video, released in January 2017, appealing to then US President-elect Donald Trump to agree to a deal to secure their release.
The exact condition of the two men remains unclear, but in his speech Mr Ghani noted “their health has been deteriorating while in the custody of the terrorists”.
Mr Ghani said the decision to conditionally release the prisoners was “a tough, but important decision” and a “humanitarian gesture”.
Anas Haqqani’s older brother, Sirajuddin, leads the Haqqani network of fighters and is a deputy leader of the Taliban.
The Haqqani network is known for carrying out attacks in the region and is described by Pakistani officials as a predominantly Afghan militant group.
Anas Haqqani was captured in 2014 alongside another commander, Hafiz Rashid, who is also set for release.
The other militant involved in the swap was named as Haji Mali Khan, who is reportedly an uncle of Sirajuddin Haqqani, the AFP news agency reports.
Auliya Atrafi, from the BBC’s Afghan service, said that confirmation of the prisoner swap came as no surprise on Tuesday, as negotiations behind the scenes had been happening for some time.
Until now Mr Ghani had made it clear the release of Haqqani network members was a red line for his government, but it now seems the president is willing to make a range of concessions if it paves the way to direct peace talks, our correspondent adds.
The Afghan government was shut out negotiations between the US and the Taliban earlier this year.
In September President Trump declared that effort “dead”, shortly after cancelling secret plans to host a Taliban delegation at Camp David in the US.