WATCH: No Charges in Deadly Police Shooting of Man Who Thought SWAT Officers Were Home Invaders

A Philadelphia police officer was justified in shooting and killing an armed homeowner who believed SWAT officers were home intruders during an early morning August raid.

No charges will be filed in the death of Ricardo Giddings, Philadelphia District Attorney Larry Krasner’s office announced Tuesday.

“We have concluded that the officer reasonably believed he was in danger of death or serious bodily injury,” Krasner office said in a statement. “The officer was, therefore, legally justified in using deadly force and in this circumstance no criminal charges are warranted.”

The Philadelphia grandfather mistook SWAT officers for home intruders and fired on police as they entered his Knox Street home in Germantown on Aug. 6 to serve a search warrant for the man’s grandson, Philadelphia Police Commissioner Richard Ross said in the immediate aftermath of the incident.

The confusion led to a shootout that ended with three people shot, police said. The homeowner was ultimately killed, his wife hurt and a veteran officer was left with a bullet lodged in his jaw.

“The simplest way to put this is this is an all-out absolute tragedy,” Ross said at the time.

The ordeal began around 6 a.m. at Giddings’ home along the 4800 block of Knox Street. Police were serving a search warrant for a 20-year-old man wanted on a weapons violation. He is the grandson of the homeowner, police said.

The arriving officers knocked on the door of the home and announced their presence at least three times, indicating they had a warrant, Ross said.

They entered the front door into a vestibule and were about to enter the home when the 59-year-old homeowner fired four shots, police said. An officer returned fire, striking Giddings in the chest and legs.

Ross said police later learned through interviews that Giddings didn’t understand that police were entering his home.

“He went about the business of protecting his home not knowing it was the police at the door that he was firing upon,” Ross said at the time.

Ross said it’s likely Giddings didn’t hear the officers announce that they were serving a warrant because the television was on at the time.

“Neighbors said they heard it but apparently he [the homeowner] didn’t hear it,” Ross said.

Prior to the shooting, the homeowner told his 67-year-old wife to flee from the house, police said. A ricocheted pellet round from a shotgun fired by police struck her in the abdomen. She also suffered back injuries after she fell while fleeing a second-floor window.

“We aren’t dealing with a bunch of criminals firing on police,” Ross said. “It touches us in a lot of different ways.”

One of the responding officers was hit in the face by a bullet during the shootout.

The 20-year-old man, who police were initially looking for, later turned himself in and was questioned, police said. He was later released, however, and no charges were filed.

The police department, Giddings’ family and others involved were told that no charges will be filed, Krasner’s office said.

Ross said it is not common for SWAT team officers to open fire during assignments.

“These high risk warrants are just that. They’re high risk for obvious reasons,” Ross said. “SWAT serves approximately 300 of them every year without incident.”

The last time a member of the SWAT team was engaged in a shootout was in 2015 while serving a warrant and the officer was hit on his bulletproof vest.

“It’s very rare because of the manner that they do their surveillance of the properties as well as their entries that they are even compelled to discharge their weapons,” Ross said.