A Coon Rapids man, police say, hung out in locker rooms at area YMCAs, shooting videos of prepubescent boys from a wristwatch with a camera attached to its face. He then allegedly created hundreds of computer files, labeling each with the first name of a boy.

Investigators also say that they found downloaded on the man’s computer a program type that child pornographers use to share their collections with others on a private network. The man had at least 25 videos of undressed boys in locker rooms, according to a variety of felony charges filed against him Tuesday.

Robert Minor, 53, was arrested after a 12-year-old boy told his parents about a man’s suspicious behavior at the Andover YMCA late last month.

“This case is very disturbing because the defendant allegedly preyed on young boys in such a secretive way,” Anoka County Attorney Tony Palumbo said. “If these charges are proven, we will advocate for a severe sentence, as we believe this is outrageous conduct.”

Minor’s computer also contained thousands of images depicting minors engaged in sexual acts, according to the charges. Authorities don’t believe he shot those images.

Police are trying to determine how many of the locker room videos were viewed by somebody other than Minor.

Minor was charged with one count of stalking a victim under 18 with sexual or aggressive intent, two counts of use of minors in a sexual performance and four counts of possession of pornographic work involving minors. Judge Sharon Hall set bail at $500,000 without conditions and $250,000 with conditions, including having no contact with children younger than 18 and no contact with health club facilities. He remained jailed Tuesday.

Minor was arrested Saturday after the 12-year-old boy saw a man hold his watch over a bathroom stall partition while he was changing out of his bathing suit, according to a charging document. The boy told his father when he got home. They searched the Internet and located a similar watch and called police.

With the assistance of the YMCA, authorities reviewed surveillance video and matched Minor to the description given by the boy, the document said. Police searched Minor’s house and found a watch like the one described.

Palumbo said that he was thankful a child felt it was safe to talk to his parents about something he knew was not right and that the YMCA had good policies in place.

The YMCA of the Greater Twin Cities doesn’t allow the use of cellphones or recording devices in locker rooms or workout and swimming areas, and all members are required to sign a code of conduct agreement, said Bette Fenton, vice president of marketing and communications. At many of the Y’s facilities, including Andover, there are separate changing rooms and private bathrooms for families with younger children, she said.

“We’ve had lots of conversations since this incident,” she said. “Who knew a wristwatch could be a video camera?”

Life Time Fitness, which has 25 health clubs in Minnesota, has similar policies and changing areas, said Natalie Bushaw, the company’s public relations director. These include private showers with doors that lock. The policies have been in place since 2003, she said.

“You try and prepare your staff to look for activity,” Bushaw said. “Safety is our No. 1 priority.”

It’s unclear how long Minor allegedly had been shooting videos, police said. On his computer, investigators found a 10-minute video of Minor following the 12-year-old boy around the locker room, according to the charging document.

Minor also created computer files with names such as Adrian, Andy, Andre, Mark, Mike and Samuel that in each case contained pictures of a different boy, the charging document said. Police are trying to determine whether the names on the files are the boys’ real names. These files are of particular concern, the document said.