(CNN) The Taliban has released two Western professors who had been held hostage for the past three years in exchange for three high-ranking militants, in a prisoner swap that could pave the way for renewed peace talks.

US citizen Kevin King and Australian citizen Timothy Weeks were forcibly removed from a vehicle while traveling in Kabul in August 2016, according to the FBI. Their release was announced Tuesday by the American University of Afghanistan (AUAF), where both men taught.

In a statement on Tuesday, the Taliban said Anas Haqqani -- who is the brother of Sirajuddin Haqqani, the deputy leader of the group and leader of the Haqqani Network -- and two other senior commanders, Haji Mali Khan and Hafiz Abdul Rasheed, had been freed as part of the deal. The Taliban called the swap a "positive step" towards "good-will and confidence building measures that can aid the peace process."

Afghanistan last week revealed a plan to "conditionally" release the three high-ranking militants "to pave the way" for the release of the two AUAF professors. In a televised statement, President Ashraf Ghani said the pair's health had deteriorated during captivity and that the decision to proceed with a prisoner swap had been made in consultation with international partners, including the United States.

In 2017, the Taliban released a video purportedly showing Timothy Weeks (left) and Kevin King (right) asking then President-elect Donald Trump to make a deal for their release.

The three Taliban figures have since left Afghanistan and have arrived in Qatar, according to Suhail Shaheen, Taliban spokesman for their political office in Doha. "I thank (the) Qatar government for providing assistance in this regard," Shaheen said on Twitter.

Read More