Three high-ranking Taliban prisoners have been swapped for American and Australian men who had been held hostage by the insurgent group since their abduction in 2016. The two freed hostages, American Kevin King and Australian Timothy Weeks, were handed over to Afghan forces at the sprawling Bagram Air Base, north of Kabul, on Tuesday, an Afghan official confirmed to CBS News.

In a statement issued Tuesday morning, King's family said he was "now with U.S. officials receiving medical care and other support as he prepares to return to the U.S., where he will be reunited with his family" after 1,199 days in captivity.

"We are so happy to hear that my brother has been freed and is on his way home to us," King's sister, Stephanie Miller, said in the statement.

Anas Haqqani, a senior leader of the Haqqani network, arrested by the Afghan Intelligence Service (NDS) in Khost province, is seen in handout photo released on October 16, 2014 Handout . / REUTERS

Afghan President Ashraf Ghani a week ago announced the "conditional release" of the Taliban figures, saying at a press event broadcast live on state television that it was a very hard decision he felt he had to make in the interest of the Afghan people.

Get Breaking News Delivered to Your Inbox

King and Weeks were abducted in 2016 outside the American University in Kabul, where they both worked as teachers.

CBS News correspondent Holly Williams said the prisoner swap was aimed at trying to restart U.S.-Taliban peace talks to end Afghanistan's 18-year war. Those talks broke down earlier this year.

Abbas Stanakzai, a senior Taliban official, confirmed earlier Tuesday to CBS News' Sami Yousafzai that the swap was "completed." He said the freed Taliban members would remain in Qatar, "and some of them will be active members of the Taliban's political and negotiating team." The Taliban's political arm is headquartered in Qatar

The three freed militants include Anas Haqqani, the younger brother of the Taliban's deputy, Sirajuddin Haqqani, who also heads the Haqqani network, one of the most powerful Taliban factions. The other two freed militants, Haji Mall Khan and Abdul Rashid Muhammad, are also family members of senior Taliban figures.

A senior member of the Haqqani network told Yousafzai the deal was a "golden opportunity for President Trump" that he hoped would "encourage all sides to restart peace talks."

Pak welcomes release of Profs Kevin King & Timothy Weeks in Afghanistan. We appreciate steps taken by all involved to make it possible. As part of the int community working to bring peace & end the suffering of the Afghan people, Pak has fully supported & facilitated this release — Imran Khan (@ImranKhanPTI) November 19, 2019

In neighboring Pakistan, Prime Minister Imran Khan also welcomed the release of the American and Australian hostages and expressed hopes that it might lead to renewed talks between the U.S. and the Taliban. Khan said Pakistan had "fully supported & facilitated this release" as part of his country's efforts to "bring peace and end the suffering of the Afghan people."

The year after they were abducted, the Taliban released two videos showing King and Weeks. A January 2017 video showed them appearing pale and gaunt. In the later video, King and Weeks looked healthier and said a deadline for their release was set for June 16 that year.

Both said they were being treated well by the Taliban but that they remained prisoners and appealed to their governments to help set them free. It was impossible to know whether they were forced to speak.

Subsequently, U.S. officials said American forces had launched a rescue mission to free the two, but the captives weren't found at the raided location.

Kevin King, an American who is being held hostage by the Taliban in Afghanistan, is shown in this screen grab taken from a video released by the extremist group.

U.S. Secretary of State Mike Pompeo and U.S. National Security Adviser Robert O'Brien made separate calls to Ghani on Monday to discuss the prisoners' release, Ghani's spokesman Sediq Sediqqi said.

According to a State Department statement, Pompeo told Ghani the U.S. was "committed to work closely together to address violence if the President's decision does not produce the intended results."

The U.S. was close to an agreement in September with the Taliban but a fresh wave of violence in the Afghan capital that killed a U.S. soldier brought talks and an impending deal to a grinding halt.

The agreement called for direct talks between the Taliban and Afghan government as well as other prominent Afghans to find a negotiated end to the war and set out a roadmap for what a post-war Afghanistan would look like.

In his discussions with Pompeo and O'Brien, Ghani said he wanted a reduction in violence and an all-out cease-fire, his spokesman said.