ST. PETERSBURG, Fla. — A 42-year-old St. Petersburg man got close to an elementary school campus, exposed himself and masturbated in front of students, St. Petersburg police said.

About 11: 55 a.m. Thursday, an undercover detective said he saw Shem Papius masturbating while standing near trees along the school fence. 

He was in plain view of two girls at recess, police said.

When detectives approached him, they say he frantically tucked himself back into his shorts and tried to run. When they caught him, he tried to resist arrest, they said.

He reportedly told police the girls were "acting X-rated."

Police did not name the school where the events happened.

The undercover detective was watching Papius because he was involved in previous incidents where he approached children at a library, recorded children at schools and playgrounds, and allegedly masturbated on school grounds, police said.

Papius is charged with three counts of lewd or lascivious exhibition and one count of obstructing or resisting arrest without violence. His bail was set at $30,150.

What other people are reading right now:

►Have a news tip? Email desk@wtsp.com, or visit our Facebook page or Twitter feed.