A man fatally shot by a Philadelphia police officer during a confrontation Wednesday inside a Port Richmond rowhouse was identified Monday as a 41-year-old from North Wildwood.

In a news release, police said Officer Curt McKee, a 16-year veteran assigned to the 24th District, shot Justin Smith of the 300 block of East 11th Avenue once in the chest after Smith ran into a stranger’s home on the 3500 block of Belgrade Street and then moved toward McKee with a knife.

It was not clear Monday why Smith was on Belgrade, or why he ran into the home of someone he apparently did not know. Attempts to reach Smith’s relatives Monday morning were not successful.

An obituary published online said that Smith was married with two children, that his wife was pregnant, and that Smith was a carpenter “best known for his infectious smile, a heart of gold, tenacious work ethic, and preaching the word of God to any who would listen.”

In the news release, police said McKee responded to a report of a fight on Belgrade at 8:47 a.m. As soon as he arrived, police said, people pointed him toward Smith, who allegedly was struggling with a woman who stood in a doorway shouting, “Get out of my house!”

Smith pushed past her, police said, and the woman — whom police did not identify — told McKee that she did not know Smith or give him permission to go inside. McKee followed Smith into the kitchen and ordered him to show his hands “several times," police said, but Smith, who had his right hand behind his back, “did not comply.”

Smith then moved toward McKee, police said, and the officer tried to use his Taser but it did not work. Smith continued moving toward McKee “wielding a knife,” police said, and McKee dropped his Taser, pulled his gun, and fired one shot at Smith’s chest.

Smith was taken to Temple University Hospital and pronounced dead at 9:16 a.m. A black-handled steak knife was recovered at the scene, police said.

McKee was placed on administrative duty while the investigation into the shooting is ongoing.