A Collegeville homeowner who shot an armed intruder last month will not face criminal charges, prosecutors said Thursday.

Montgomery County District Attorney Kevin R. Steele said the shooting was justified because “all necessary elements were met” under the legal principle known as the Castle Doctrine: Someone broke into the man’s home, the intruder was armed and threatening him, and the homeowner did not provoke the shooting.

Robert Pollock, 55, of Schwenksville, broke into the man’s home at 11:30 p.m. Feb. 16, according to prosecutors. Pollock forced open the front door and pointed a Smith & Wesson .357-caliber revolver at the homeowner and a woman who was inside.

“Fearing for his life and the lives of others in the residence,” the homeowner shot Pollock with a gun he is permitted to carry, Steele said. Pollock was pronounced dead at the scene, and later tested positive for alcohol and drugs.

Steele’s office did not identify the shooter, and it was unclear why Pollock had allegedly forced his way into the home.