(CNN) -- A reporter was killed by a U.S. service member last July in southern Afghanistan in a case of mistaken identity, according to the results of an investigation by NATO's International Security Assistance Force.
Ahmad Omid Khpalwak -- a free-lancer for the BBC and Pajhwok News Agency in Afghanistan -- was killed during an insurgent attack in the Uruzgan province city of Tarin Kowt on July 28. He was 25 and joined the BBC in May 2008 as a stringer, the network said.
"Mr. Khpalwak was shot by an ISAF member who believed he was an insurgent that posed a threat and was about to detonate a suicide vest improvised explosive device," the NATO-led force said in a statement Thursday. ISAF identified the soldiers at the scene as Americans.
"The investigating officer found that the ISAF member involved in this incident complied with the laws of armed conflict and rules of engagement and acted reasonably under the circumstances."
Peter Horrocks, director BBC Global News, said the death is "a tragedy for his family and friends as well as his colleagues at the BBC."
It "further highlights the great dangers facing journalists who put their lives on the line to provide vital news from around the world," he said. "It is essential that journalists are given the best possible protection whilst reporting in dangerous situations so that the world can hear their stories."
Insurgents staged what ISAF said was a "complex attack" on a number of targets, including the provincial governor's compound and the Radio Television Afghanistan compound. The Committee to Protect Journalists said at least 22 people were killed and 37 people were injured.
Gen. John R. Allen, commander of ISAF, appointed an independent investigating officer to examine the circumstances of the death.
The report said two insurgents gained entry to the RTA compound when they used a car bomb to destroy a gate and a section of the wall.
From inside the building they traded fire with uniformed Afghan forces and shot at U.S. soldiers arriving at the scene. The firing from the insurgents eventually stopped amid escalating force by the Americans.
Afghan leadership told the forces that two suicide bombers were in the RTA building and that they "were not aware of any civilians present," ISAF said.
"Upon U.S. soldiers entering the RTA building, the two suicide bombers detonated their explosives, collapsing the front walls of the building and trapping members of the clearing team under heavy brick debris," ISAF said.
As some soldiers aided the injured, some continued clearing building remains and others "remained in overwatch to provide security."
During the clearing operation, a soldier "identified movement of a young adult male in the building through a large hole in a broken wall."
"The room the man was in was immediately adjacent to the room where one of the suicide bombers had detonated his suicide vest IED, and across the hall from the other suicide vest detonation, just minutes before," ISAF said.
The soldier heard a shot he thought was from the man's "exact location." ISAF said "it is probable that the shot he heard was actually fire by a soldier inside the building during the building clearing."
The soldier "assessed the individual he observed to be enemy and fired a single round which did not strike him. In the stress and urgency of the moment, it is highly probable that soldiers in the courtyard outside the building incorrectly perceived that shot as having been fired by the man in the building."
ISAF said several soldiers thought the man was shooting, and called out warnings.
"A soldier was directed to move up to the broken wall where the man was seen. As the soldier approached he observed a young adult male with a beard with something clinched in one of his fists and reaching for something on his person with his other hand."
The soldier assessed the actions as those of a suicide bomber who was working to detonate an IED that "posed a lethal threat."
The soldier shot and killed the man. They later discovered that the man was Khpalwak. No weapon was found on him.
"It appears that all the rounds perceived as coming from his location were instead fired by U.S. soldiers," ISAF said.
The BBC said the "confusion surrounding the circumstances" intensified "the tragedy felt by the journalist's family and colleagues.""The BBC recognizes that ISAF has provided clarification that he was killed by a U.S. soldier, ending a period of uncertainty," the network said in a statement. "We will be studying the details of the findings and await receipt of the full report."CNN's Joe Sterling contributed to this report