An arrest has been made in the attempted kidnapping of a child from a Solana Beach school yard last week.

In an unexpected development, the man suspected of trying to abduct a 7-year-old girl from Skyline Elementary School decided to surrender to deputies, his attorney told NBC 7 Wednesday.

The suspect had agreed to turn himself into the San Diego County Sheriff's Department through attorney Paul Pfingst.

Deputies confirmed the arrest early Thursday, announcing that 22-year-old Jack Henry Doshay of Fairbanks Ranch was in custody.

On March 23, the suspect walked onto the campus not long after the dismissal bell rang and confronted the young student as she walked to her after-school program, according to the San Diego County Sheriff's Department. The girl's father says the "reckless and crazy" man tried to silence her by wrapping tape around her face and started to carry her off.

However, the 7-year-old kicked and screamed, drawing the attention of staff and parents nearby. They chased the man but could not catch him before he drove away.

The community has been on high-alert since the incident, which prompted the Solana Beach School District to hold safety assemblies at each of its schools.

The victim's father sent out a mass email, warning fellow parents to teach their children to fight as his daughter did.

“Yell, scream, draw as much attention as you can,” he said in the chilling email. “This is what saved our daughter.”

The sheriff's department released a composite sketch of the suspect two days later.