In 2012, Caitlan Coleman, a native of Stewartstown, Pennsylvania, and her Canadian husband, Josh Boyle, were in Afghanistan’s Wardak Province as part of an adventure trip through Russia and Central Asia. Coleman was several months pregnant at the time. The couple was captured by the militant Haqqani network and was seen over the years in two videos, along with two of the children they had in captivity, in which they pleaded for their freedom. A third child was born recently.

On Thursday the Pakistani military said it had rescued “5 Western hostages including 1 Canadian, his US National wife and their three children from terrorist custody through an intelligence based operation by Pakistan troops and intelligence agencies.” The statement said the family had been kept in Afghanistan since their abduction but had crossed over into Pakistan in recent days and that Pakistani authorities were alerted to this fact by the U.S. counterparts.

President Trump, in a statement, confirmed that those rescued were Coleman, now 31, Boyle, now 34, and their three children, all of whom were born in captivity.

The couple’s path to Wardak, from there to captivity, and from there to their eventual freedom, was a complicated one. Canadian media have previously said Boyle was fascinated with terrorism. In 2009 he told the Globe and Mail: “Anything related to terrorism on Wikipedia, I wrote, pretty much.” Boyle was also married at one point to the sister of Omar Khadr, the teenage Canadian who was captured in Afghanistan in 2002 and held in Guantanamo Bay until 2012. (At first Khadr pleaded guilty to killing an American soldier, but later said his confession was coerced. The U.S. returned him to Canada to serve out the rest of his eight-year sentence, but he was freed by a Canadian court. He eventually sued the Canadian government, won a multimillion settlement, and an apology.)  Intelligence officials have previously called that link and Boyle’s abduction a “horrible coincidence.” Boyle and Coleman met online. They were married in 2011, a year before they set off on their trip.

The circumstances of their rescue are still not clear. The Pakistani military said the family were freed following an “operation by Pakistani forces, based on actionable intelligence from US authorities.” Both the White House and the U.S. State Department said the U.S., working with Pakistan, has “secured the release of the Boyle-Coleman family from captivity in Pakistan.”

The distinction is important, because it’s the difference between a military operation to free the five hostages and a negotiation for their release. Past successful efforts at negotiating hostage releases with the Taliban or its allies with it have involved Qatar, the Arab nation that is known for a pragmatic foreign policy that, among other things, involves maintaining ties to actors like the Taliban and then serving as intermediaries for indirect negotiations. It’s partly this posture of seeming openness to militant groups that has thrust Qatar into a diplomatic standoff with its Arab neighbors—one that the U.S. has tried unsuccessfully to mediate. So it’s still an open question whether and how any negotiations with Coleman and Boyle’s captors took place, and with whom. Jennifer Griffin, the Fox News national-security correspondent, quoted a U.S. official as saying, in her words: “there was NO military operation to release Caitlan Coleman and her family. This was a negotiated handover.”

“We will never know” how they were freed, Husain Haqqani, a former Pakistani ambassador to Washington who is now a leading critic of his country’s government and its military, told me. He cited past cases of freed hostages whose recovery was later discovered to have been the result of negotiations between the Pakistani military and militants. (Haqqani is of no relation to the network that kidnapped Coleman and her family.)

Haqqani, who is now a senior fellow at the Hudson Institute, added that the hostage release “raises questions about the competence of Pakistani intelligence” in finding people within its borders or in the tribal areas near it.

“This is an intelligence service who behaves like the KGB or the Stasi with its own citizens who dissent, and is able to harass them and find there everywhere  and anywhere, but is totally unable to find bin Laden when he is located in Pakistan or to find the home where a family is being kept hostage for five years,” he said.

Although the couple was abducted in Afghanistan, others have raised the possibility they were in Pakistan. The Haqqani network operates in the porous border between Afghanistan and Pakistan, and it may well be the case that Coleman and Boyle were moved back and forth to secure locations in the two countries. At a hearing before a U.S. Senate panel in 2015, Lieutenant Colonel Jason Amerine, a U.S. special-forces soldier, said the couple and the one child they had at the time “are … hostages in Pakistan.” Other former hostages of the Haqqani network, including the American soldier Bowe Bergdahl and the journalist David Rohde, were also moved from Afghanistan into the tribal areas of Pakistan.

Pakistan has been viewed as a reluctant partner in the U.S.-led war on terrorism. Most famously Osama bin Laden, the al-Qaeda leader, was killed by U.S. Navy SEALs in Abbotabad, the Pakistani military town, where he had lived for several years after the attacks of September 11. Pakistan is also believed to support groups like the Taliban that are working to destabilize the U.S.-backed Afghan government in Kabul.

At the same time, however, Pakistan itself has become a victim of terrorism. Militant groups have staged frequent attacks over the years against politicians, minorities, and others. And the Pakistani military has cracked down on militant groups operating inside the country. Add to this the Trump administration’s policy in the region, which has emphasized pressuring Pakistan to crack down on terrorism. The Defense Department has withheld millions in military funding from the country because of its perceived lack of action against the Haqqani network in particular. Trump, in his statement about the hostage release, said that it was “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.”

But Haqqani was dismissive of the idea. “This is really typical of Pakistani intelligence services behavior,” he said. “Whenever the heat gets too much, they deliver something to raise American hopes. ... It has happened enough times in the last 20 years for people to be cynical.”

He added: “If Pakistan is to regain its credibility, it will have to act in a consistent manner against all jihadis and make sure that that consistency is sufficiently visible for cynicism about Pakistani behavior to end.”

Indeed, Trump, in his statement, urged Pakistan’s “cooperation and teamwork in helping secure the release of remaining hostages.” At least one other American is believed to be in the Taliban’s custody: Kevin King, a 60-year-old who was working at the American University of Afghanistan in Kabul when he was abducted in 2016 along with Timothy Weeks, a 48-year-old Australian colleague. Another American, Paul Overby, has been missing in the country since 2014.