A North American family captured in Afghanistan in 2012 and held hostage since, was released during a Pakistani army operation conducted on the basis of US intelligence, said the Pakistani army on Thursday.

“The Pakistani army has recovered five Western hostages – one Canadian, its American wife and three children – detained by terrorists during a Pakistani military operation,” the army said.

“The US intelligence agencies were tracking the hostages and communicating with Pakistan on 11 October 2017 via the Kurram tribal agency,” Afghanistan’s border, the army said.

“The operation of the Pakistani forces, based on intelligence from the US authorities, has been successful. All the hostages have been released unharmed and are being repatriated to their country of origin “.

“We welcome media reports that a family of US citizens has been freed from captivity,” a spokesman for the US embassy in Islamabad told AFP without confirming their identity.

The Pakistani army also does not communicate the identity of the people, but it could be the Canadian Joshua Boyle and his American wife Caitlan Coleman, abducted in 2012 by the Taliban during a trip to Afghanistan, had at least two children in captivity.

The North American couple and two of their children appeared in an Afghan insurgent video in December 2016, calling on the then US President Barack Obama and his successor, Donald Trump, to come to the rescue of the family.

The parents of Caitman Coleman, had called in mid-2016 in a video message the Taliban to release the family. In November 2015, they received a letter from their daughter, authenticated by an expert, telling them that she had given birth to two boys in captivity.

“The success of the operation underscores the importance of timely sharing of information and Pakistan’s continuing commitment to combat this threat through cooperation between the two forces against a common enemy”, the Pakistani army said in a statement.

The unexpected release of the hostages comes as US President Donald Trump prepares to send his closest advisers to Pakistan, US Secretary of State Rex Tillerson and his colleague in the Defense Secretariat James Mattis.

This double visit aims to convey the message to the Pakistanis that their support for jihadist groups must stop, recently said several senior officials in Washington.

Trump had accused Pakistan in August of being “often a haven for agents of chaos, violence, and terror” in a speech outlining its strategy for Afghanistan.

The relationship between the two countries has been particularly tense since 2011 after the green light given by Barack Obama for the operation that would lead to the death of Osama bin Laden in Abbottabad, a garrison town of Pakistan.