A 10-year-old girl from in Hilliard, Ohio, was left traumatized after a man exposed himself to her while she walked to school. But she managed to do "everything right in a wrong situation" which led to the man being arrested.

The accused, who was nabbed just hours after the incident, was found to be a convicted sex offender.

The little girl was walking to Avery Elementary School at around 8:45 a.m. Thursday when Joseph A. Ennemoser, 48, got out of his vehicle and exposed himself to her, according to WBNS-10TV.

As the horrified child ran away, Ennemoser reportedly got back into his vehicle and followed her out of the neighborhood, before driving away.

The girl arrived at the school and narrated the incident to the first adult she came across. A 911 call was immediately made and resulted in Ennemoser being arrested at Wendy's restaurant on Renner Road at around 12:30 p.m.

"Today's unfortunate situation demonstrated our community's strength in quickly working together to protect a child in our community," Chief of Police Michael Woods said in a statement. "This child did everything right in a wrong situation by running away, telling an adult, and remembering important details to pass along to police."

Ennemoser was charged with criminal child enticement, a fifth-degree felony. It is an elevated charge because he is a previously convicted sex offender.

The accused had pleaded guilty to two counts of gross sexual imposition in a 2001 incident involving a girl who was 7 or 8 years old at the time. He was sentenced to six years in prison, according to Licking County Common Pleas Court records.

Following Thursday's incident, there was an increased presence at the girl's school throughout the day.

The girl's mother, Katie Harris came forward and revealed that her daughter feared being kidnapped as she ran away from the man.

"She thought she was going to be taken and the last thing she could think of is if she was ever going to see her family again and if she did get taken what she would do," Harris told NBC4. "So she just took off running and that's all she could think about is just running so she wouldn't be taken."

"I'm just thankful my daughter knew what to do and that Hilliard Police were on it and that there were a lot of people watching out for my daughter," the mother added.

Sgt. Tyler Harris with Hilliard Police also praised the child's courage and said, "I just want to give kudos a [sic] to the little girl who was brave and had quick thinking and also thank you to the citizen who recognized that vehicle and called us in the first place."

Representational image (man in handcuffs)
Representational image (Source: Pixabay / ID 4711018)