Philadelphia police opened fire at a man who pointed a shotgun at officers overnight in North Philadelphia, authorities said.

The man was later taken into custody unharmed.

The incident happened at about 1 a.m. near North 22nd Street and Indiana Avenue.

Chief Inspector Scott Small told reporters at the scene that officers responded to a report of a man with a gun, got out of their police cruiser, identified themselves, and told the armed man to drop his weapon.

The man didn't comply, and instead raised the gun and pointed it at the two officers.

"That's when one of the officers fired his weapon," Small said.

The man, who was not immediately identified, then dropped the shotgun and fled, Small said.

He ran into a bar on the 3000 block of North 22nd Street, where officers found his hooded sweatshirt and sneakers in a restroom, police said.

The shoeless man was apprehended nearby a short time later.

The drama unfolded about three blocks from the store where Officer Robert Wilson III was fatally gunned down during an attempted robbery earlier this month.