A Long Beach man who pleaded no contest to kidnapping an eight-year-old girl from a Signal Hill Park earlier this year was sentenced Wednesday to 12 years in state prison, the Los Angeles County District Attorney’s Office said.

Robert Sok, 28, entered a plea of one count each of kidnapping and failure to update sex offender registration annually at the LA County Superior Court, Long Beach branch. He also admitted that he knew the victim was under 14 years old.

Deputy District Attorney Irene Lee said Sok grabbed the girl, who was walking ahead of her mother and grandmother in the park, on Jan. 20. The prosecutor said Sok placed his hand over the girl’s mouth when she began to scream for help.

The mother and grandmother ran after Sok, and the grandmother was able to hit him with a water bottle two to three times, the District Attorney’s office said. Sok released the girl and was arrested shortly thereafter by Signal Hill Police Department officers.