A 25-year-old man with a permit to carry a concealed firearm shot a 43-year-old man who allegedly was terrorizing a West Philadelphia neighborhood Monday evening, police said.

The man was shot in the right knee and was transported by police to Penn Presbyterian Medical Center, where he was listed in stable condition, said Chief Inspector Scott Small.

Just before 5:50 p.m., two 19th District officers on foot patrol were approached by a witness describing a man behaving erratically nearby in the unit block of North 57th Street, Small said. As the officers approached, they witnessed the shooting.

The younger man, who was in the neighborhood visiting family members, had an active permit to carry and was cooperating with police, Small said. Police took his semiautomatic handgun.

Witnesses said the older man, who was a local resident and appeared to be under the influence, was punching cars and people, and at one point used a rock to shatter the rear window of a Mitsubishi SUV, Small said.

At that point he was confronted by the younger man and allegedly responded by punching him in the face, Small said. The younger man responded by shooting him in the leg.

The shooting appeared to be an act of self-defense but the case was under investigation, Small said.