WASHINGTON -- The Defense Department on Friday released the names of two Army Rangers who died during a raid on a compound in Afghanistan on Thursday.

Sgt. Joshua P. Rodgers, 22, and Sgt. Cameron H. Thomas, 23, were killed by small arms fire during an operation targeting the emir of the Afghan branch of the Islamic State of Syria and Iraq (ISIS) in Nangarhar province, the Pentagon said.

The Pentagon is investigating whether the soldiers died as a result of friendly fire.

Get Breaking News Delivered to Your Inbox

"That may have been what happened here," Pentagon spokesman Capt. Jeff Davis said during a briefing Friday.

Sgt. Joshua P. Rodgers, 22, and Sgt. Cameron H. Thomas, 23, were killed in action in Afghanistan on April 27, 2017 Defense Department

The firefight in which they were killed took place south of an ISIS cave complex targeted in April by the largest non-nuclear bomb ever used by the U.S. in combat, CBS News national security correspondent David Martin reports.

The target of the raid was Abdul Hasid, the emir of ISIS Khorasan, the group's Afghan branch. Hasid was believed to be hiding in the compound close to the border between Afghanistan and Pakistan. The raid was conducted by 50 Army Rangers and 40 Afghan commandos on Thursday, the Pentagon said.

The mission was considered high-risk and Gen. John Nicholson, commander of coalition forces in Afghanistan, personally approved the raid.

Rodgers and Thomas were killed in the opening moments of the ensuing firefight, which lasted for three hours and included air strikes by drones, AC-130 and Apache gunships and F-16 fighter jets. The military said the troops came under fire from "360 degrees."

The U.S. has not yet confirmed whether Hasid was killed in the raid, but suspects he was. About 35 ISIS fighters and several ISIS leaders were killed, the Pentagon said.

The suspicion of friendly fire first arose during a debriefing of the Rangers after the raid, Martin reports. A review of surveillance footage further added to the suspicion, and the suspected friendly fire appeared to come from the American troops, not the Afghan commandos.

The military says it is investigating the incident and will interview the service members involved. Autopsies will be performed on the two bodies after they are returned to Dover Air Force Base.

Rodgers was from Bloomington, Illinois, and Thomas was from Kettering, Ohio. Both were on their third deployments to Afghanistan and assigned to a Ranger regiment based out of Fort Benning, Georgia, according to the Pentagon.

They were the second and third American servicemen to die in service this year.