A woman with a concealed-carry license shot a man who tried to enter a home through a window Monday in Gresham on the South Side.

The 20-year-old man was trying to help his girlfriend, 19, get back into her house at 8:41 a.m. in the 8900 block of South Lowe after she locked her keys inside, according to Chicago police. She told investigators she had tried to ring the doorbell but no one answered.

While the man was trying to climb in through the window, a 34-year-old woman inside the house thought he was a home invader and shot him, police said. The woman, who is dating someone who lives at the home with the man’s girlfriend, called 911 to report the shooting.

The man ran away and later showed up with gunshot wounds to his left shoulder and left knee at Little Company of Mary Hospital in Evergreen Park, police said. He was transferred to Christ Medical Center in Oak Lawn, where his condition was stabilized.

Area South detectives questioned the man and the woman who shot him, but no charges were filed, police said.