The Obama administration has not shied away from launching risky rescue raids, but the record has been mixed. The best known is perhaps the raid by SEALs in 2009 to free a cargo ship captain, Richard Phillips, from Somali pirates, an episode that was made into a movie starring Tom Hanks.

In 2012, SEALs freed an American aid worker and her Danish colleague from Somali pirates.

But a military raid in July 2014 to free several American and Western hostages held by the Islamic State in Syria failed because the captives had already been moved. That same year, militants from Al Qaeda’s affiliate in Yemen killed an American man and a South African after Special Operations forces tried to free them.

The raid in August targeted a Taliban faction known as the Haqqani network. The Haqqanis are among the Taliban’s most capable and violent factions. They have held a number of high-profile Western captives over the years, including Sgt. Bowe Bergdahl, who was freed in 2014 in a prisoner swap with the United States.

The Haqqanis sit atop the Taliban’s lucrative business of kidnapping Westerners and prominent Afghans, most of whom are held for ransom. The kidnappings are usually carried out by lesser-known insurgent factions or criminal gangs, who then sell the victims to the Haqqanis.

Captives are usually then moved into the Haqqanis’ strongholds in the tribal areas of Pakistan. Once in Pakistan, the hostages are essentially beyond the reach of American and European forces, which can operate across Afghanistan but cannot legally launch raids inside Pakistan.

Knowing this, insurgents try to move hostages across the border as quickly as possible, and American and European forces typically scramble in the immediate aftermath of an abduction to rescue the victims before they can be spirited out of Afghanistan.

That appears to have been the case in the raid to free the professors, though officials did not say whether they believed that the men were still in Afghanistan or had been moved to Pakistan.