Foreign hostages kidnapped five years ago by a terrorist group in Afghanistan and recovered by the Pakistan Army in Kohat left the country by plane from Islamabad on Friday, two security officials said.

The officials , speaking on condition of anonymity, did not specify where the family was headed.

American Caitlan Coleman, 31, and her Canadian husband Joshua Boyle, 33, were abducted while backpacking in Afghanistan in October 2012 on a trip that had earlier taken them to Russia, Kazakhstan, Tajikistan, and Kyrgyzstan.

Coleman was pregnant with her first child at the time of the abduction and gave birth to all three of the couple's children in captivity.

The family was rescued by the Pakistan Army in an operation in Kohat on the basis of "actionable intelligence" provided by Washington, that indicated the hostages and their captors had crossed the Pak-Afghan border into Kurram Agency on Oct 11, 2017.

After their recovery, the family of five were to go by plane to Afghanistan's Bagram air base, but Boyle declined to board the plane.

The couple told US officials and their families they wanted to fly commercially to Canada.