A 10-year-old girl from Arizona outsmarted a pervert who tried to lure her into his car on Wednesday, police said.

The girl was walking with her friend in a park in San Tan Valley when a man in a white SUV pulled up next to them and told them to get in the car, the Pinal County Sheriff’s Office told ABC 15.

The man told the 10-year-old that her brother was in a bad accident and that she needed to go with him. That’s when she asked him for the “code word” — a safety tool her mom, Brenda James, devised a few months ago should a stranger ever approach her daughter. The man in the SUV did not know the “code word” and so he drove away, police said.

“We came up with a code word, and this one time, it saved my daughter’s life,” James told Fox 10.

James said her daughter called her in tears on Wednesday to tell her that a man tried to take her away.

Children in the area told police that they saw the van circling the park and that the driver covered his face to conceal his features.

The suspect was described as a white man in his 40s with a short beard, PCSO officials said.

Anyone with information about the suspect should call PCSO at (520)-866-5111.