A Fauquier County assistant principal arrested on child pornography charges said he has never had sexual contact with a minor, his attorney said Monday.

Joshua Myers, 29, of Warrenton, is charged with possessing and distributing pornography. Federal authorities said that Myers told an undercover officer, who he talked to in an online chat room, that he had traveled to California to have sex with a child.

During a Monday hearing in U.S. District Court in Alexandria, Geremy C. Kamens, an assistant federal public defender, said Myers “categorically denies engaging in any sexual acts with a minor.”

Magistrate Judge Ivan D. Davis ordered that Myers be released to the custody of his parents, who live in Pennsylvania. Myers must wear an electronic ankle bracelet that can be used to track his movements, and must be supervised by an adult if he is around children, Davis ordered.

Myers, who most recently worked at Greenville Elementary School in Nokesville, was arrested Wednesday at his home. He had been tapped to become principal at Brumfield Elementary in Warrenton in July, but Fauquier school officials said he has been suspended without pay and is no longer in line to be promoted.

According to court papers, Myers kept videos of children engaged in sexual conduct with adults and other children on his computer. During an April online chat with the undercover officer, authorities allege, he shared a password that allowed the officer to download seven videos, including some that showed children engaged in sexual contact with adults and other children.

Fauquier school officials said in a statement that “there is no indication that children enrolled in Fauquier County public schools were involved in circumstances that led to Mr. Myers’ arrest.”

Assistant U.S. Attorney Maureen Cain said in court that in the online chat Myers was “bragging” about a sexual experience with a boy in California, saying it was “a lot of fun.” She argued that Myers should be detained pending trial.

“We have to adequately protect the community from someone who has inclinations of having sex with a child,” Cain said.

Kamens, who noted that Myers has no criminal record and strong ties to the community, said there is “zero evidence of anything more than pictures downloaded from the Internet.”

Myers has worked in Fauquier County public schools since 2004. He taught first and fifth grade at Thompson Elementary School before becoming assistant principal at Greenville.

Myers also has worked as a camp counselor and an administrator for a remedial summer program at Moss Hollow for Fauquier County fourth graders, according to the May announcement of his appointment at Brumfield, which appeared on the Fauquier schools Web site but was removed after his arrest. Myers also was a 2008 nominee for the The Washington Post’s Agnes Meyer Awards, given to teachers.