EXETER, California -- The student called himself Johnny Ramirez. But he was actually 22-year-old Alex Salinas, an undercover narcotics officer.

Eight months later, the ruse was up, and a school-day police sweep with the help of the young policeman ended with a dozen California students in custody on drug charges.

Some people wondered how the deception could have gone on for so long. Others lamented that the problems of the big city had come to the quaint community.

"It's amazing we were able to keep a secret in this little town for that long," said Police Chief Cliff Bush, who had been searching for years for just the right officer. "People in little towns tend to know everything about everybody."

Leading the campus sweep this month was the tall, lanky Salinas, dressed in a crisp black uniform and combat boots of the Exeter Police Department.

Still, there was no mistaking the boyish face and the wide smile gleaming with braces.

"A lot of jaws dropped when they saw me," Salinas said. "They knew me as that kid at school that they hung around with, and then the next thing they're in handcuffs and I'm in a uniform."

The sting got more attention from the media than a drug bust of 12 students normally would because of something the police chief now laments: It happened the same week as the debut of the Hollywood comedy "21 Jump Street," which features -- you got it -- undercover cops fighting crime at a school.

Chief Bush insisted it was not a case of life imitating art.

"A day or two later I became aware of the movie," Bush said. "The last thing I would do is check movie premieres. This just happened to coincide with the movie's release."

There had been no major complaints about drug dealing at the 1,000-student school that sits within sight of the police station, but Bush said he had been thinking for years about doing an undercover sting to send a message.

One day last summer, he ran into Salinas, who was weeks away from graduating from the police academy.

Bush eventually approached Salinas with the plan. With it came a full-time job -- an offer Salinas wouldn't refuse.

As Johnny Ramirez, Salinas attended football games and pep rallies. He purposely landed himself in detention so he could meet people outside of the four classes he attended before reporting each afternoon to the county drug task force headquarters for briefings and homework assignments. He made a Facebook page and friendships, which made the deception hard for him to bear.

"There were a few students I got to know who are good kids, and I did feel kind of bad for being their friend and then being something different," he said.

Only the principal, vice principal and Johnny's guidance counselor knew about the operation, school Superintendent Renee Whitson said.

"Even I didn't know the name he'd go by," she said.

Eventually students sold the new kid marijuana and cocaine, the prescription painkiller hydrocodone and the muscle relaxant Soma.

"There was certainly no celebration on the day of conclusion. It was a very sad day," Whitson said. "These are our students. We hope this is the necessary wakeup call to make this positive for their lives."

Only three of the arrested students are older than 18, and one student's parents were also arrested for investigation of methamphetamine possession.

In the end, large quantities of drugs were not confiscated, and none of the arrests involved trafficking significant quantities, though many purchases were for amounts that exceeded "personal use," Salinas said.

Was it worth keeping an officer off the streets and on a school campus for eight months?

Yes, Chief Bush said. But he is almost embarrassed that the undercover operation has drawn so much publicity, mostly because of his own bad timing regarding the film release.

"This is what I was trying to avoid, that we busted the local Scarface at the high school," Bush said, making reference to another Hollywood movie, about a drug kingpin. "Turns out they were just tiny amounts, but if you've got just one kid dealing drugs at school, that's too many."

The chief hopes the arrests have a lasting impact on all students, though he does realize he might have created a problem of another kind.

"I'd hate to be the new kid at school next year," he said. "They won't make very many friends."