An Israeli army officer who fired the entire magazine of his automatic rifle into a 13-year-old Palestinian girl and then said he would have done the same even if she had been three years old was acquitted on all charges by a military court yesterday.

The soldier, who has only been identified as "Captain R", was charged with relatively minor offences for the killing of Iman al-Hams who was shot 17 times as she ventured near an Israeli army post near Rafah refugee camp in Gaza a year ago.

The manner of Iman's killing, and the revelation of a tape recording in which the captain is warned that she was just a child who was "scared to death", made the shooting one of the most controversial since the Palestinian intifada erupted five years ago even though hundreds of other children have also died.

After the verdict, Iman's father, Samir al-Hams, said the army never intended to hold the soldier accountable.

"They did not charge him with Iman's murder, only with small offences, and now they say he is innocent of those even though he shot my daughter so many times," he said. "This was the cold-blooded murder of a girl. The soldier murdered her once and the court has murdered her again. What is the message? They are telling their soldiers to kill Palestinian children."

The military court cleared the soldier of illegal use of his weapon, conduct unbecoming an officer and perverting the course of justice by asking soldiers under his command to alter their accounts of the incident.

Capt R's lawyers argued that the "confirmation of the kill" after a suspect is shot was a standard Israeli military practice to eliminate terrorist threats.

Following the verdict, Capt R burst into tears, turned to the public benches and said: "I told you I was innocent."

The army's official account said that Iman was shot for crossing into a security zone carrying her schoolbag which soldiers feared might contain a bomb. It is still not known why the girl ventured into the area but witnesses described her as at least 100 yards from the military post which was in any case well protected.

A recording of radio exchanges between Capt R and his troops obtained by Israeli television revealed that from the beginning soldiers identified Iman as a child.

In the recording, a soldier in a watchtower radioed a colleague in the army post's operations room and describes Iman as "a little girl" who was "scared to death". After soldiers first opened fire, she dropped her schoolbag which was then hit by several bullets establishing that it did not contain explosive. At that point she was no longer carrying the bag and, the tape revealed, was heading away from the army post when she was shot.

Although the military speculated that Iman might have been trying to "lure" the soldiers out of their base so they could be attacked by accomplices, Capt R made the decision to lead some of his troops into the open. Shortly afterwards he can be heard on the recording saying that he has shot the girl and, believing her dead, then "confirmed the kill".

"I and another soldier ... are going in a little nearer, forward, to confirm the kill ... Receive a situation report. We fired and killed her ... I also confirmed the kill. Over," he said.

Palestinian witnesses said they saw the captain shoot Iman twice in the head, walk away, turn back and fire a stream of bullets into her body.

On the tape, Capt R then "clarifies" to the soldiers under his command why he killed Iman: "This is commander. Anything that's mobile, that moves in the [security] zone, even if it's a three-year-old, needs to be killed."

At no point did the Israeli troops come under attack.

The prosecution case was damaged when a soldier who initially said he had seen Capt R point his weapon at the girl's body and open fire later told the court he had fabricated the story.

Capt R claimed that he had not fired the shots at the girl but near her. However, Dr Mohammed al-Hams, who inspected the child's body at Rafah hospital, counted numerous wounds. "She has at least 17 bullets in several parts of the body, all along the chest, hands, arms, legs," he told the Guardian shortly afterwards. "The bullets were large and shot from a close distance. The most serious injuries were to her head. She had three bullets in the head. One bullet was shot from the right side of the face beside the ear. It had a big impact on the whole face."

The army's initial investigation concluded that the captain had "not acted unethically". But after some of the soldiers under his command went to the Israeli press to give a different version, the military police launched a separate investigation after which he was charged.

Capt R claimed that the soldiers under his command were out to get him because they are Jewish and he is Druze.

The transcript

The following is a recording of a three-way conversation that took place between a soldier in a watchtower, an army operations room and Capt R, who shot the girl

From the watchtower [three-way conversation between watchtower soldier, the operations room in another location, and finally, Captain R, the officer on the ground near watchtower "It's a little girl. She's running defensively eastward." "Are we talking about a girl under the age of 10?" "A girl about 10, she's behind the embankment, scared to death." "I think that one of the positions took her out." "I and another soldier ... are going in a little nearer, forward, to confirm the kill ... Receive a situation report. We fired and killed her ... I also confirmed the kill. Over."

From the operations room "Are we talking about a girl under the age of 10?"

Watchtower "A girl about 10, she's behind the embankment, scared to death."

A few minutes later, Iman is shot from one of the army posts

Watchtower "I think that one of the positions took her out."

Captain R "I and another soldier ... are going in a little nearer, forward, to confirm the kill ... Receive a situation report. We fired and killed her ... I also confirmed the kill. Over."

Capt R then "clarifies" why he killed Iman

"This is commander. Anything that's mobile, that moves in the zone, even if it's a three-year-old, needs to be killed. Over."

• This article was amended on 1 September 2010, to make explicit that the opening watchtower conversation is between three participants.