The policeman, who has not been named, shot Elwy Okaz in the leg because he mistakenly believed that Okaz was the attacker, prosecutors said Wednesday.
In fact, Okaz was trying to protect his wife Marwa El-Sherbini, 31, later dubbed the "veil martyr", from a frenzied knife attack by Russian-born Alex Wiens.
Wiens, now 29, was jailed for life on November 11 for the racially motivated murder as well as the attempted murder of Okaz. The couple's three-year-old son was also in the courtroom.
The situation "was particularly hard to assess since Elwy Okaz and Alex Wiens were both covered in blood and Elwy Okaz had just managed to grab the handle of the knife with his hand, making it appear as though he was the attacker," prosecutors said in a statement, before emphasising that it was a "highly dramatic" and "unclear situation."
"The actual attacker Wiens was holding the blade of the knife, which added to the impression that he was the one being attacked," prosecutors said.
They added that the policeman, who was not in the Dresden courtroom when the attack began, only had seconds to act after entering the room and that he had warned several times that he was going to shoot.
"It must also be noted that the murderous attack on Marwa El-Sherbini and Elwy Okaz was only stopped by the courageous actions of the policeman and that without his intervention there might have been further attacks on Elwy Okaz and his family," the statement said.
The killing, as well as the slow reaction of Germany's politicians and media, sparked outrage in Sherbini's home country and in the wider Muslim world.
Wiens and Sherbini were in court because Wiens was appealing against an earlier fine for calling the headscarved Sherbini a "terrorist", an "Islamist" and a "whore" in a playground in August 2008.