PITTSBURGH — A western Pennsylvania prosecutor says the shooting death of a man who fired upon Pittsburgh police officer earlier this year was justified.

Allegheny County District Attorney Stephen Zappala Jr. said Tuesday that 39-year-old Mark Daniels fired three shots at the officer before he was killed early Feb. 11 in the Homewood neighborhood.

Police said two officers on foot patrol were fired upon by a man who emerged from behind a building. An officer returned fire then and later when they found the suspect again, and the suspect was found bleeding behind a home.

Zappala said he believes the officer “might be dead” if he hadn’t had his weapon drawn. He said the motive remains unknown, but “a reasonable conclusion” might be that Daniels didn’t know they were police officers.