Wairi admitted to setting up and hiding a video camera in a locker room in order to videotape children changing in and out of clothes, prosecutors said.

Prosecutors said Wairi admitted the images and videos of children would sexually arouse him, and admitted to viewing the images for sexual self-gratification.

He also told prosecutors he posted an advertisement on Craigslist offering his babysitting services.

Wairi allegedly told authorities he used an international website to locate images of child pornography, and then contacted users via email to trade images and videos of children being sexually exploited.

Cambridge Schools Superintendent Dr. Jeffrey Young said he feels "shocked and betrayed" by the arrest of Wairi on child pornography charges.

He said he was in his second year teaching at the Graham and Parks School, and a full background check was conducted before Wairi was hired.

Young added there was no evidence to suggest anything took place at school.

Federal authorities would not say where Wairi admitted to recording locker room footage.

Wairi was placed on administrative leave by the district.

A joint statement released by Somerville Mayor Joseph Curtatone and Superintendent Tony Pierantozzi said the alleged acts shocked them both.

"It is difficult to comprehend how a seemingly functional person with no criminal record could victimize children in such a horrible way," the joint statement said. "The criminal justice system will deal with this individual. What we however must do now is come together as a community."

According to the statement, Wairi was a student teacher at John F. Kennedy School during the 2008-09 school year. He also worked in Somerville at the Arthur D. Healy School as a fifth- and sixth-grade teacher from 2009-11 and worked as a fifth-grade teacher from 2011-12.

A school forum has been planned in Somerville at East Somerville Community School at 11:30 a.m., and another will be planned when April vacation has ended.

The cafeteria at the school will be open from noon until 8 p.m. Friday for any parent or guardian with questions or concerns about the allegations against the former teacher.

Wairi was held without bail pending a detention hearing scheduled for April 23.

View these breaking news photos submitted on other stories from our u local community. When YOU see breaking news happen, email your photos to ulocal@wcvb.com -- or post them (and your videos) on ulocal.wcvb.com.

SITE'S NEW FEATURE BEING ROLLED UT. FROMMING ABOUTTON'S NEWS LEADER, THIS IS WCVB NEWSCENTER 5. A LOCAL TEACHER FACING CHILD PORN CHARGES. ING NOW CONCERNS IN TWO COMMUNITIES OVER THE SAFETY OF YOUNG STUDENTS. GOOD EVENING. THE SUSPECT TAUGHT FIFTH GRID IN CAMBRIDGE. FLOOR PROSECUTORS SAY HE ADMITTED OF MAKING RECORDS OF CHILDREN. HE HAS TIES TO SOMERVILLE. JORGE IS LIVE IN CAMBRIDGE. JORGE? WELL, WHEN HE WAS ARRESTED, HE CONFESSED TO A NUMBER OF CRIMES TONIGHT, THE TEACH ARE IS BEING HELD WITHOUT BAIL. SCHOOL OFFICIALS HERE IN CAMBRIDGE EXPRESSING SHOCK AND BE TRAYAL. HE HAS TAUGHT AT THE PARK SCHOOL FOR NEARLY TWO YEARS. 27-YEAR-OLD JOSH WEARY, SEEN HERE AT A BASKETBALL GAME. CRIMINAL BACK GROUND CHECK AND REF REASONSES ALL CLEAN. NO COMPLAINTS. NO CONCERNS RAISED THAT IN ANYWAY WOULD HAVE RAISED A RED FLAG. WHERE HE WAS ARREST AT THE CONDO IN SOMERVILLE. PLEASE LEAVE A MESSAGE. INVESTIGATORS SAY BUY HIS ON ACCOUNTS, HE ESTIMATED THAT HE POSSESSED HUNDRED OF IMAGE AND VIDEOS OF CHILD PORNOGRAPHY. I FEEL SHOCKED AND PEE TRAYED, JORGE, AS, AS A FATHER, AS MUCH AS SUPER DIDN'T. THE INVESTIGATION STARTED ALSO SUMMER AFTER THEY REPORTED A SUSPICIOUS E-MAIL AEXCHANGE. HE ADMITTED DOWNLOADING AND TRADING GRAPHIC VIDEO AND PHOTOS OF MEN HAVING SEX. NO ONE WEARS A BADGE. ONE WEARS A SUIT THAT TELLS YOU WHAT IS GOING ON INSIDE OF THEM. IT CATCHES US ALWAYS. IT CATCHES PEOPLE OFFGUARD. ALSO ALLEGEDLY CONFESSING TO SETTING UP AND HIDING A VIDEO CAMERA IN A LOCKER ROOM TO INDIVIDUAL VIDEOTAPE CHILDREN CHANGING IN AND OUT OF CLOTHES. AN OLDERRERROOM IS ONLY USED FORSTER AGE. AT THIS POINT SHALL WE HAVE NO SPECIFIC EVIDENCE SUGGESTING THAT ANYTHING HAPPENED IN THE SCHOOL BUILDING OR DURING THE SCHOOL DAY. ACCORDING TO INVESTIGATORS, WEARY TOLD THEM THAT HE HAD POSTED AD ON CRAIGSLIST OFFERING BABY-SITTING SERVICE. NOW TONIGHT, HE HAS BEEN PUT IN ADMINISTRATIVE LEIB HERE WHERE TWO COMMUNITY MEETINGS HAVE BEEN SCHEDULED DURING AND AFTER SCHOOL VACATION NEXT WEEK. BEFORE TEACHING HERE, HE ALSO TAUGHT FIFTH GRID IN SOMERVILLE. TOMORROW MORNING, THE CITY OFFICIALS ARE PLANNING A PRESS CONFERENCE.

A maid who cleaned the home of former New England Patriots player Aaron Hernandez has testified at his murder trial that she saw him "messing with" the security camera in his basement the day after the killing.