The girl was walking with a friend near a park last week when a man drove up next to her and said her brother had been in a serious accident.
[Ads /]
When he insisted she needed to come home with him, she asked for a code word. The driver took off.
"I went like, 'What's the code word?' And he just kind of froze his face and drove off," she explained.
"I was scared because if I would have hopped in, I don't know what he would do to me," she added.
The girl's family recently came up with a plan, so their kids would know who can and can't pick them up.
"They know who can pick them up and who can't. But there's always that special situation where there might be somebody they don't know or don't know well so that's why we came up with a code word," the girl's mother, Brenda James, told ABC News in an exclusive interview.
[Ads /]
The family's plan is being praised by police departments who are encouraging other parents to do the same.
"The mother of this child did an awesome job teaching a code word to her child and that potentially saved that girl's life," said Sheriff Mark Lamb with Pinal County.
Experts say the most important thing a child can do to escape a would-be kidnapper is to be pro-active.
The National Center for Missing and Exploited Children suggests creating "What if" scenarios for your child to make sure they understand how to use a code word in a real situation. It also recommends teaching your children that bad people don't necessarily look mean and will often smile and act friendly.
RELATED: 'Code word' lesson stops would-be kidnapper
Girl saved from attempted kidnapping by family code word