A man was fatally shot when he attempted to rob another man Sunday evening outside a store in the South Loop, police said.

The 31-year-old victim was walking out of a store about 6:15 p.m. in the 1200 block of South Jefferson when the attempted robber pulled out a gun and demanded money, according to Chicago Police.

After the suspect stole his property, the victim — who has a permit to carry a concealed gun — shot the man in the chest, police said.

The suspect, identified as 37-year-old Corey Haggard, was taken to Stroger Hospital, where he was pronounced dead at 11:37 p.m. Monday, police and the Cook County medical examiner’s office said. He lived in the Lawndale neighborhood on the Southwest Side. An autopsy was scheduled for Tuesday.

Area Central detectives have opened a death investigation.