No charges will be filed in the death of a man shot by police in his home in August after he fired at them, apparently mistaking them for intruders, Philadelphia’s District Attorney’s office announced Tuesday.

Authorities said members of the SWAT team were seeking the grandson of 59-year-old Ricardo Giddings for weapons violation when they entered the Germantown residence on Aug. 6. Police said Giddings fired four rounds from a stairway after mistaking the SWAT officers for home intruders, FOX 29 reported.

JASON VAN DYKE TRIAL: CHICAGO COP FOUND GUILTY OF SECOND DEGREE MURDER OF LAQUAN MCDONALD 

The mix-up led to a shootout that left three people injured. Giddings died in the shooting while SWAT officer Jaison Potts, 49, was shot in the face. He was critically injured.

Giddings' wife was shot in the abdomen and hospitalized. Giddings' grandson later turned himself in to police.

Prosecutors said the shooting was justified because the officer “reasonably believed he was in danger of death or serious bodily injury."

PENNSYLVANIA CAR EXPLOSION THAT KILLED FATHER, 2-YEAR-OLD SON WAS MURDER-SUICIDE, OFFICIALS SAY

"The officer was, therefore, legally justified in using deadly force and in this circumstance no criminal charges are warranted," Philadelphia District Attorney Larry Krasner’s office said in a statement.

Police commissioner Richard Ross called the shooting “an all-out, absolute tragedy.”

The Associated Press contributed to this report.