An assistant principal at Greenville Elementary School in Nokesville was indicted Thursday on two federal counts of distributing child pornography and one count of receiving child pornography, prosecutors said.

Neil H. MacBride, United States Attorney for the Eastern District of Virginia, and James W. McJunkin, Assistant Director in Charge of the FBI’s Washington Field Office announced the charges after the indictment was made public.

Authorities said in court papers that Joshua Myers, 29, of Warrenton, viewed and traded computer videos of children engaged in sexual conduct with adults and other children.

Myers was arrested June 15 at his home after sharing a file-sharing password with an undercover officer during an April online chat and “bragging” about a sexual experience with a boy in California, according to authorities.

Through his lawyer, Myers denied ever having sexual contact with a minor and was released after his arrest to the custody of his parents in Pennsylvania on the condition that he wear an electronic ankle tracking bracelet and that he be supervised by an adult when near children. .

Fauquier school officials say Myers is no longer in line to be promoted to principal at Brumfield Elementary in Warrenton.