WASHINGTON (Reuters) - Two U.S. special operations forces soldiers killed in eastern Afghanistan on Wednesday may have been struck by friendly fire in an operation targeting the emir of Islamic State militants in Afghanistan, the Pentagon said on Friday.

Pentagon spokesman Captain Jeff Davis told reporters that the military was investigating whether the two troops may have been killed by ground fire, either by American forces or Afghan commandos taking part in the raid, though it appeared to be accidental.

“We are investigating the circumstances of the combat deaths of the two Army Rangers in the beginning of what was an intense three-hour firefight,” Davis said. “It is possible these Rangers were struck by friendly fire.”

Earlier in the day, the Pentagon identified the soldiers as Sergeant Joshua Rodgers, 22, and Sergeant Cameron Thomas, 23. A third soldier was wounded in the operation.

In a statement, U.S. Defense Secretary Jim Mattis said the United States owed the slain troops an “irredeemable debt.”

Davis said the target of the raid was Abdul Hasib, the emir of Islamic State in Afghanistan. The U.S. military suspected he was killed in the operation, but could not yet confirm it.

The operation, near the border with Pakistan, started at about 10:30 p.m. local time on Wednesday and within minutes the 50 U.S. Army Rangers along with 40 Afghan commandos came under fire from multiple direction.

“It was during these initial moments of the raid that the two Rangers were mortally wounded,” Davis said.

Fighting carried on for the next three hours, with Islamic State fighters firing from a heavily fortified compound and tunnel system.

The operation involved drones and aircraft like the AC-130 gunship, Apache helicopter and F-16 fighter jets.

About 35 Islamic State fighters are believed to have been killed, Davis said.

U.S. and Afghan forces were extracted from the area at about 3 a.m. Thursday.

Islamic State’s offshoot in Afghanistan, known as the Sunni jihadist group’s so-called Khorasan Province, is suspected of carrying out several attacks on minority Shi’ite Muslim targets.

U.S. officials say intelligence suggests Islamic State is based overwhelmingly in Nangarhar and neighboring Kunar province.

Estimates of its strength in Afghanistan vary. U.S. officials believe the movement has only 700 fighters, but Afghan officials estimate it has about 1,500.