The U.S. and Pakistani governments have secured the release of Taliban hostages Caitlan Coleman, her husband, Joshua Boyle, and their three children born in captivity.

Details on the operation were scant, but Coleman, of Stewartstown, Pa., and Boyle, the son of a Canadian judge, and their children were reportedly at the U.S. Embassy in Pakistan on Thursday.

“This is a positive moment for our country’s relationship with Pakistan,” President Donald Trump said in a statement. “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.”

The last time anyone heard from Coleman, the York County native spoke of the “Kafkaesque nightmare” she and her husband had been trapped in for nearly five years.

The couple had been kidnapped in Afghanistan in 2012 and held in Pakistan by a criminal network linked to the Taliban. Through the years, videos and letters trickled out from their captors: Coleman and Boyle begging for freedom and for “money, power and friends” for the Haqqani network holding them prisoner. In the last, chilling video, released in December, two of the couple’s children appeared on screen. “My children have seen their mother defiled,” Coleman read from a script.

The couple met online, bonded over a love for Star Wars and married in Central America in 2011.

A friend of Boyle’s who asked to be identified by his first name, Greg, said he met the intensely private Boyle about 15 years ago playing an online Star Wars game. They became close, and Boyle eventually attended his wedding.

“He was so funny and so charismatic,” he said. Boyle and Coleman had been friends for some time online before they married, he said.

“He raved about her — how good a person she is, and how smart she is,” Greg said.

Adventurous travelers, Coleman and Boyle had planned a backpacking trip through Kyrgyzstan, Kazakhstan, and Tajikistan in 2012. Afghanistan had never been on the itinerary. Boyle had spoken sometimes, Greg said, of visiting Afghanistan once the conflict there was resolved, to write about the aftermath of the war there. But his friend said Boyle hadn’t told him about any current plans to travel there.

“I kind of wish he would have told me, because I would have said, ‘Hey, dummy, what are you doing?” Greg said.

The last their parents heard from them before their capture was an email Boyle sent from an internet cafe there, saying he was in an “unsafe” part of Afghanistan.

They would appear sporadically in videos from the Haqqani network over the years, saying their captors had threatened to kill them if the Afghan government would not stop executing Taliban prisoners.

Previously, Boyle was married for a year to Zaynab Khadr, whose father had suspected ties to al-Qaida and whose brother was arrested in Afghanistan at the age of 15 and held in Guantanamo Bay for years. Canadian officials have said his kidnapping was likely unrelated to his ex-wife’s family ties, and friends have said Boyle was a pacifist, raised Mennonite, who became involved with the Khadr family because of his interest in human rights issues.

———

(Washington correspondent Jonathan Tamari contributed to this report.)

———

©2017 The Philadelphia Inquirer. Distributed by Tribune Content Agency, LLC.