A Texas mother of six was attacked at her apartment complex, but said her car keys saved her life.

Jessica Collins, 27, was grabbing a cellphone charger from her car around 2:30 a.m. Friday when a man punched her in the nose, according to KPRC.

"Thankfully I had my keys in a defense position because I gave him a right hook and ended up getting him in the neck then he ran," Collins wrote on Facebook.

>> Man struck by bus gets up, walks into pub 

Collins told KPRC that she learned this defense tactic as a child after her mother saw it on a self-defense documentary.

“Ladies if ur (sic) going somewhere alone always always carry your keys with one between two knuckles .. it's so important to remember your safety,” Collins wrote.

Collins’ post has gone viral. As of Monday afternoon, it had been shared more than 77,000 times and had 24,000 likes.

Read more at KPRC.