NEW DELHI: An American woman, her Canadian husband and their three young children have been freed after five years in captivity in Afghanistan, where they were being held by a Taliban-linked militant group.

Caitlan Coleman, 31, and her husband, Josh Boyle, 34 were captured by the Taliban linked Haqqani network in 2012. The two were kidnapped while backpacking through Wardak Province, a militant stronghold near the Afghan capital of Kabul. Coleman was pregnant at the time, later giving birth in captivity. She had two more children in captivity.

Previously, the Haqqani network had demanded the release of one of its commanders, Anas Haqqani, in exchange for the family. Anas Haqqani was captured by the Afghan government in 2014, and sentenced to death. The group then threatened to execute the family if he was killed. In December 2016, a video of the family was released by the group. Coleman said in the video that “their group will do us harm and punish us. So we ask that you are merciful to their people and, God willing, they will release us.”

Earlier attempts to free the couple fell short. In January 2016, Colin Rutherford, a Canadian, was freed after Qatar arranged a prisoner swap with the Afghan government, with officials hoping more releases will follow. When this did not eventuate, many claimed that peace talks with the Taliban could result in Coleman, her family and other prisoners being freed. The talks, however, failed to get off to a start, with the Taliban completely pulling out after their leader Mullah Akhtar Muhammad Mansour was killed in a US drone strike in May 2016.

The family were freed by the Pakistani military, which said that it took custody of the hostages on Wednesday “through an intelligence-based operation.” United States President Donald Trump said the rescue was possible because of joint efforts of the Trump administration and the Pakistani military, adding that “this is a positive moment for our country’s relationship with Pakistan.” “The Pakistani government’s cooperation is a sign that it is honoring America’s wishes for it to do more to provide security in the region. We hope to see this type of cooperation and teamwork in helping secure the release of remaining hostages and in our future joint counterterrorism operations.”

Prior to this official statement, Trump made a fairly unusual reference to the release. On Wednesday night, during a speech on his tax plan in Harrisburg, Pennsylvania, Trump said, “Something happened today where a country that totally disrespected us called with some very, very important news. And one of my generals came in, they said, you know, I have to tell you, a year ago they would have never done that. It was a great sign of respect. You’ll probably be hearing about it over the next few days.”

At the time, Trump did not mention the hostages or Pakistan. He elaborated on the comment on Thursday, mentioning Pakistan by name and saying that Islamabad was “starting to respect the United States again.”

The Pakistani army released a statement of its own, saying: “The success underscores the importance of timely intelligence sharing and Pakistan’s continued commitment towards fighting this menace through cooperation between two forces against a common enemy.”

While it’s prudent not to comment on whether Pakistan’s cooperation has anything to do with “respect” for the United States, it is true that the two countries have shared an increasingly strained relationship -- especially over Pakistan’s role in responding to terrorism in South Asia. Afghanistan and India -- Pakistan’s neighbours -- have long maintained that Islamabad funds and aids terror across its borders, alleging that Islamabad draws a distinction between “good” terrorists and “bad” terrorists. While the country moves to squash terror within its own borders, it is not doing enough to combat terror outfits that are active in Afghanistan and India -- critics say. Islamabad denies the charge, but in recent years, various US authorities have made statements asking Pakistan to act equally against all terror groups, including the Haqqani network.

A number of foreign captives are currently being held by various terror outfits in Afghanistan, with the Haqqanis believed to be linked to at least two other missing Americans: Kevin King, a university professor was kidnapped in August 2016 and Paul Overby who disappeared in May 2014 after he tried to establish contact with the leader of the Haqqani network.