A 24-year-old man was in critical condition after being shot by a police officer when he allegedly pointed a gun at police during an altercation in West Philadelphia Tuesday night.

Shortly before 8 in the 5200 block of West Jefferson Street, police responded to reports of a man with a gun in a minimarket, Chief Inspector Scott Small said.

Three officers entered the store, found a man fitting the description, and tried to frisk him. The man fought with the officers and punched one in the face, Small said.

The officers pulled the man outside the store, where he continued to fight, Small said. The man then pulled a 9mm semiautomatic handgun from a pants pocket and pointed it at the officers, Small said.

One officer fired a shot, striking the man in the abdomen, Small said.

"The officers actually showed a lot of restraint," Small said.

Police took the man to the Hospital of the University of Pennsylvania, where he was reported to be in surgery.

Besides the gun, the man was carrying a large concealed knife, Small said.

The officer who was punched suffered a minor cut and bruises.