The photo shows a crime scene in America: AFP/Getty Images

A woman is thanking God after she managed to wrestle a gun from an assailant, shoot him, and then narrowly avoid getting shot herself.

As the sun was rising in Chicago this past weekend, 54-year-old Marnita Carter said she was confronted at a bus stop by a man. The man pulled out a gun, and demanded she hand over her purse.

But Ms Carter was not having it. Once the gun was out and cocked, she said she pulled it out of his hands. She shot his hand. They struggled before she was thrown to the ground, and the man said he was going to shoot her for what she’d done.

The gun jammed. The robber ran.

“I was shocked that it didn't go off again,” Ms Carter later told the Chicago Tribune. “It was the Lord — that's what it was.”

“The minute he pulled it out, he cocked it. And I thought, 'I have to think of something,” Ms Carter said. “I had to do what God gave me the strength to do: Defend myself.”

Ms Carter told police that she had initially screamed out for help, but nobody nearby responded. After narrowly avoiding death, she said she began shaking and crying uncontrollably.

Soon after arriving on the scene, police arrested a man, 23-year-old Dennis Evans, at his home a few blocks away over the alleged crime.

Ms Carter lives in a southside Chicago neighbourhood, and works in a hotel kitchen across town — that’s why she was up so early on a Saturday, waiting for the bus. When the man, who was considerably larger than her, finally gained control of the gun and told her he was going to shoot her, she said she thought of her three children.

Mr Evans is being held in jail without bond after a hearing on Sunday. He faces charges of attempted murder and attempted robbery.