The Taliban has released Australian academic Timothy Weeks and American colleague Kevin King, who have been held captive for more than three years, as part of a hostage swap deal.

The two academics were abducted outside the American University in Kabul where they worked as teachers, in August 2016.

Australian Prime Minister Scott Morrison said he was "profoundly pleased and relieved" that the two men had been let go by their kidnappers, and thanked US President Donald Trump for his assistance and cooperation.