The rescue ended an intensive effort by American intelligence officials to locate the couple — who had been taken hostage in October 2012 — and their children. When she and Mr. Boyle were kidnapped, Ms. Coleman was seven months pregnant; she gave birth four times in captivity.
The C.I.A. declined to comment. Trump administration officials cast the rescue as a win for Pakistan without publicly acknowledging that officials there had to be pressured into conducting the operation.
“This is a positive moment for our country’s relationship with Pakistan,” President Trump said in a statement.
Efforts to free the family had stalled repeatedly, and the family’s time as hostages was harsh. Mr. Boyle has said that his wife was raped and that one of their children died shortly after birth. He said that militants killed the infant, a charge the Taliban have denied.
In January 2016, the United States thought a deal had been struck with the Haqqanis, with help from Qatar, to release hostages. The F.B.I. and Army Rangers picked up Colin Rutherford, a Canadian being held by the Haqqanis, and American officials were hopeful that Ms. Coleman and her family might be next.
But the Haqqanis freed no one else. American officials said communications with the Haqqani network had gotten garbled, causing confusion, and the death of the leader of the Taliban, killed by a United States drone strike last year, also set back efforts to rescue the hostages. The diapers that F.B.I. agents in Afghanistan had bought for Ms. Coleman’s children would go unused.
Not only were hostages kept in captivity, the militants were also not done kidnapping. In August 2016, they seized an Australian, Timothy Weeks, and an American, Kevin King, 61, both teachers at the American University of Afghanistan in Kabul. Navy SEALs launched a rescue operation but came up empty; a tip about the where the men were being held turned out to be outdated.
But last month, the American intelligence community caught a break. The C.I.A. had positioned the drone over a Haqqani encampment in the Kurram Valley, a region near Pakistan’s border with Afghanistan. It spotted the woman believed to be Ms. Coleman among the armed fighters.
The commandos of SEAL Team 6, tapped to rescue the family, started rehearsing. The raid was to take place not far from where the C.I.A. had originally spotted the family, according to one military official.
But the risky operation planned on Pakistani soil was called off because some in the United States government were not certain that the people spotted by the drones were Ms. Coleman, Mr. Boyle and their children, according to the officials. Others voiced worries about the difficult terrain and the moon — it was too bright for a nighttime airborne raid.
Why the Haqqanis decided to move the family is not clear. But on Oct. 11, as they headed toward Kohat, a city farther inside Pakistan, American intelligence officials realized they could not let the opportunity to save the family slip by — the United States had to act.
American officials formed a plan to press the Pakistani government. Mr. Trump was briefed, and Defense Secretary Jim Mattis and Secretary of State Rex W. Tillerson both backed the idea that should the Pakistani government decline to try to rescue the family, the Navy SEALs would go in.
Officials said that as Mr. Hale, the ambassador, conveyed the Trump administration’s demands, other senior officials, including Gen. Joseph L. Votel, who oversees American military operations in the Middle East and southwest Asia as head of the United States Central Command, were also applying pressure.
The push worked. American officials said the Pakistanis acted quickly, intercepting the vehicle with Ms. Coleman and her family. According to Pakistani security officials, they were able to shoot out the tires of the vehicle, but the captors manage to flee.
Mr. Boyle has said a gun battle ensued before he and his family were freed, but American officials remained skeptical and a Pakistani military spokesman has said only that the vehicle’s tires were blown out.
In an interview after he was freed, Mr. Boyle praised the Pakistanis: “Our gratitude is boundless.”