In this image from video released by Taliban Media in December 2016, Caitlan Coleman speaks while her husband Joshua Boyle holds their two children. (AP)

Pakistani officials have described the mission to free an American woman, her Canadian husband and their three children as a harrowing operation and a rare bit of positive news in the troubled relationship between their country and the United States.

Pakistani soldiers, acting on American intelligence, appear to have opened fire Wednesday at the tires of a car carrying Caitlan Coleman, 31, her husband, Joshua Boyle, 34, and their three children not long after it crossed the border from Afghanistan into Pakistan’s tribal areas.

A senior Trump administration official, shortly after the family’s release, compared their ordeal to “living in a hole for five years.”

But, as with so many aspects of the murky and often confusing U.S.-Pakistan relationship, the family’s dramatic rescue has raised as many questions as it has answered. On Friday night, Coleman, Boyle and their children arrived in Toronto after the family, at the husband’s insistence, had refused to get on a plane for the United States.

Boyle’s father told the New York Times that his son did not want to stop at Bagram air base in Afghanistan, where Americans have been accused of abusing detainees.

In a statement to the Associated Press, Boyle said, “God has given me and my family unparalleled resilience and determination.”

The family’s refusal to travel to the United States led some former U.S. officials to speculate about the couple’s motives in journeying to Afghanistan five years earlier and suggest that they may be trying to avoid tough questions from U.S. intelligence officials. Other U.S. officials played down that explanation.

“The administration made very clear that if they wanted to come back to the United States there would be no problems,” said a U.S. official who is familiar with the case and was speaking on the condition of anonymity to discuss dealings with the family.

Shortly after marrying in 2011, Coleman and Boyle visited Central America and then headed off to Russia and Central Asia. Coleman was pregnant with their first child in 2012 when they decided to go hiking in Wardak province, a dangerous region south of Kabul that is dominated by feuding militant groups.

The couple’s decision to visit Wardak and Boyle’s unusual personal history set off widespread speculation inside the U.S. intelligence community about his motives. Before he wed Coleman, Boyle had married and divorced the oldest sister of Omar Khadr, a Canadian who was arrested by U.S. forces in Afghanistan in 2002 and was alleged to have ties to al-Qaeda.

The patriarch of the Khadr family was killed in 2003, along with al-Qaeda and Taliban members, in a shootout with Pakistani security forces near the Afghanistan border. Boyle’s associations with the family led some U.S. intelligence officials to speculate that the visit to Afghanistan may have been part of a larger effort to link up with Taliban-affiliated militants.

“I can’t say that [he was ever al-Qaeda],” said one former U.S. intelligence official, who spoke on the condition of anonymity to discuss sensitive information. “He was never a fighter on the battlefield. But my belief is that he clearly was interested in getting into it.”

After they were taken captive, Boyle and Coleman appear to have suffered through a harrowing ordeal.

Coleman was pregnant when they were abducted and gave birth in captivity, the AP reported. Upon landing at the Toronto airport late Friday, Boyle told journalists their captors had killed their infant daughter and raped Coleman during the years they were held.

In a video released in December 2016, Coleman described her captivity as a “Kafkaesque nightmare.”

“Just give the offenders something so they and you can save face and we can leave the region permanently,” she said in the video aimed at President Barack Obama.

The successful rescue also set off a flurry of questions about what it might portend for U.S.-Pakistan relations. “The first thing to recognize is that this relationship is as broken as it’s been since 2011,” when U.S. officials launched a clandestine raid into Pakistan to kill Osama bin Laden, said Moeed Yusuf, an associate vice president for the United States Institute of Peace.

The Trump administration’s new strategy in Afghanistan has put a heavy emphasis on military operations to punish the Taliban in Afghanistan and has increased pressure on Pakistan to eliminate enemy sanctuaries there.

Pakistan would prefer a plan that prioritizes peace talks with the Taliban over a military-
focused effort. In the aftermath of the successful mission, President Trump suggested that his tough rhetoric had helped to bring Islamabad into line. But Yusuf and other analysts suggested that the president was misreading Pakistani motives.

“The danger here is that Washington internalizes the message that tough talk with the Pakistanis is working,” Yusuf said. “I am overall pessimistic about the relationship.... If there is one thing that underpins everything, it is a deep mistrust between these two countries.”

Other analysts who follow South Asia were slightly more positive in their assessments and saw potential for cooperation between the two nations.

“The United States and Pakistan have some key areas of aligned interests, including on counterterrorism and counterextremism,” said Daniel Feldman, who was the special representative for Afghanistan and Pakistan in the Obama administration. “This demonstrates that there are opportunities to work together in both our nations’ interests.”

At the Coleman household in southeastern Pennsylvania, the focus wasn’t on geopolitics but on the return of a long-missing daughter.

Her family posted a note on their door referring to the “joyful news” and asking for privacy “as we make plans for the future.”

Shaiq Hussain in Islamabad and Greg Miller in Washington contributed to this report.