An assistant principal at a Fauquier County elementary school was arrested Wednesday and charged with possessing and distributing child pornography, federal prosecutors said.

Joshua Myers, 29, who works at Greenville Elementary School in Nokesville, chatted online with an undercover officer and gave the officer a password to folders on his computer that contained child pornography, according to papers filed in U.S. District Court in Alexandria. The officer used the password to download seven videos, including some that show children engaged in sexual contact with adults and other children, court papers say.

During an April 14 online chat with the undercover officer, Myers said that he had traveled to California to have sex with a child and had “engaged in sexual contact with children ranging in age from nine years of age to fourteen years of age,” the court documents say. Myers has not been charged with sexually abusing children.

Fauquier school officials could not be reached for comment.

According to a biography on the Fauquier schools Web site, Myers started in the school system in 2004 as a first-grade teacher at Thompson Elementary. He was appointed as Greenville’s assistant principal in 2008 and also supervised the county’s elementary program for students with emotional disabilities.

According to the biography, Myers was a 2008 nominee for the The Washington Post’s Agnes Meyer Awards, given to teachers.

Myers was selected to become principal at Brumfield Elementary beginning July 1, according to the biography.

According to court papers, FBI agents from the Child Exploitation Task Force and the Warrenton police department searched Myers’s Fauquier home and car Wednesday and found a thumb drive, which Myers told authorities contained child pornography files. The documents say Myers also told agents that he had similar files on his laptop at school.

Myers also said he was the person who had chatted online with the undercover officer, the documents say.

Myers is scheduled to appear before a magistrate Thursday morning, officials said.

Staff writer Michael Alison Chandler contributed to this report.