An off-duty Phoenix police officer working traffic in uniform was involved in a shooting in the parking lot of a fast-food restaurant Thursday evening.

The officer heard a commotion got out of his own vehicle to check on the noise and found a man pointing a gun at two adults in the parking lot, police say.

The officer drew his weapon and officials say he gave commands for the armed man to drop his gun. A short time later, the officer fired his weapon, striking the man.

The man, whose name hasn't been released, was transported to a hospital with serious injuries, but he's expected to survive, ABC15 reports.

Authorities believe this incident may be related to a nearby shoplifting incident.