A man was defending himself and his mother when he shot an armed robber outside a Publix store in Huntsville on Thursday, police said.

The 23-year-old man hasn’t been publicly identified, but police said he was within close range of a gun-wielding robber when he took out his own concealed carry gun and pulled the trigger.

It happened shortly before 6 p.m. at Publix on Old Monrovia Road near the Providence neighborhood. The young man and his mother were chatting in the parking lot when two people, armed with pistols, walked up and demanded money, Lt. Michael Johnson said.

Police said they are charging 22-year-old Precious Howard and 19-year-old Deangelo Lindsay in the robbery. Lindsay is at Huntsville Hospital being treated for a gunshot wound.

During the robbery, Lindsay started to turn his gun toward the 23-year-old man’s mother, Johnson said. That’s when the 23-year-old shot Lindsay.

Lindsay and Howard drove away but the vehicle crashed near the AMC movie theater, Johnson said. The crashed vehicle was reported stolen during a carjacking in Mountain Brook, an affluent suburb of Birmingham, according to police.

Lindsay and Howard are from the Birmingham area, Johnson said. Howard is charged with two counts of first-degree robbery. It’s a Class A felony that’s punishable by up to life in prison.