Pakistani Prime Minister Imran Khan on Tuesday welcomed the release of two foreign professors by the Afghan Taliban and said Pakistan had facilitated the release.

The Taliban had held hostage American University of Afghanistan's professors - Kevin King from the United States and Timothy Weeks from Australia, whom Taliban had kidnapped in August 2016 from the Afghan capital Kabul.

Three Taliban leaders were freed on Monday night under a prisoner swap deal. They were flown to Qatar where the Taliban have political headquarters, the Taliban sources told the media.

The Pakistani prime minister welcomed the release of the foreign professors in a series of tweets.

Pakistan welcomes release of professors Kevin King and Timothy Weeks in Afghanistan, Khan tweeted, adding that Pakistan has fully supported and facilitated this release as part of its policy of supporting initiatives for a negotiated political settlement of the Afghan conflict.

He hoped that this step gives a boost of confidence to all parties involved to re-engage in the peace process and said Pakistan remains committed to facilitating this peace process.

In spite of the peace process, the Afghan Taliban has however continued to target Afghanistan's beleaguered Shia Hazara community. In Taliban-controlled territory in Afghanistan, women's education and employment is banned, and their mobility severely restricted.

The lack of evolution in the Taliban ideology makes many question what the cost of negotiating with the Taliban will be for the future of Afghanistan. In charting out its ambitions for the peace process, analysts have questioned if the Pakistani government is recognizing what a Taliban would entail for Afghan women and religious minorities.