WASHINGTON — One late afternoon in April, helicopter-borne American commandos intercepted a vehicle in southeastern Syria carrying a close associate of the Islamic State’s supreme leader, Abu Bakr al-Baghdadi.

The associate, Abdurakhmon Uzbeki, was a rare prize whom United States Special Operations forces had been tracking for months: a midlevel but highly trusted operative skilled in raising money; spiriting insurgent leaders out of Raqqa, the Islamic State’s besieged capital in Syria; and plotting attacks against the West. Captured alive, Mr. Uzbeki could be an intelligence bonanza. Federal prosecutors had already begun preparing criminal charges against him for possible prosecution in the United States.

As the commandos swooped in, however, a firefight broke out. Mr. Uzbeki, a combat-hardened veteran of shadow wars in Syria and Pakistan, died in the gun battle, thwarting the military’s hopes of extracting from him any information about Islamic State operations, leaders and strategy.

New details about the operation, and a similar episode in January that sought to seize another midlevel Islamic State operative, offer a rare glimpse into the handful of secret and increasingly risky commando raids of the secretive, nearly three-year American ground war against the Islamic State. Cellphones and other material swept up by Special Operations forces proved valuable for future raids, though the missions fell short of their goal to capture, not kill, terrorist leaders in order to obtain fresh, firsthand information about the inner circle and war council of the group, also known as ISIS.

“If we can scoop somebody up alive, with their cellphones and diaries, it really can help speed up the demise of a terrorist group like ISIS,” said Dell L. Dailey, a retired commander of the military’s Joint Special Operations Command and the chairman of the Combating Terrorism Center at West Point.

American military and intelligence officials caution that the Islamic State is far from defeated, particularly with a sophisticated propaganda apparatus that continues to inspire and, in some cases, enable its global following to carry out attacks. But in the self-proclaimed caliphate across swaths of Iraq and Syria, the terrorist group’s last two major strongholds are under siege, many senior leaders have fled south to the Euphrates River Valley, and its legions of foreign fighters are battling to the death or slipping away, possibly to wreak havoc in Europe.

The race to drive the jihadists out of eastern Syria, where they have held sway for three years, has gained new urgency as rival forces converge on ungoverned parts of the region. Syrian forces and Iranian-backed militias that support them are advancing east, closer to American-backed fighters battling to reclaim Raqqa. Russia threatened on Monday to target American and allied aircraft the day after the United States military brought down a Syrian warplane.

This highly volatile environment puts an increasing premium on the Special Operations missions.

Despite his nom de guerre, Mr. Uzbeki, 39, was a native of Tajikistan, not Uzbekistan, and honed his fighting skills with the Islamic Movement of Uzbekistan, a Taliban-allied jihadist group, according to an American military official. About 10 years ago, he moved to Pakistan, where he had extensive contacts with Al Qaeda, the official said. In recent years, he had moved to Syria and joined the Islamic State’s fighting ranks.

Mr. Uzbeki was close to Mr. Baghdadi, the Islamic State’s leader, and helped plot a deadly attack on a nightclub in Istanbul on New Year’s Day. He was targeted for his role in the Islamic State’s plotting of attacks around the world, said Col. John J. Thomas, a spokesman for the United States Central Command. “He facilitated the movement of ISIS foreign terror fighters and funds,” Colonel Thomas told reporters in April.

After months of waiting for an opportunity to seize Mr. Uzbeki without putting civilians at risk, one arose on April 6 for the so-called expeditionary targeting force, a group of commandos from the secretive Joint Special Operations Command who hunt Islamic State leaders in Iraq and Syria

About 3 p.m., Mr. Uzbeki was driving from Mayadeen, a city in southeastern Syria that has become an enclave for Islamic State leaders fleeing Raqqa. (The Central Command said this past week that it had killed Turki al-Bin’ali, a senior recruiter and propagandist, in an airstrike on May 31 in Mayadeen.)