A former fourth-grade teacher at Alexandria’s John Adams Elementary School was sentenced to a maximum of 30 years in prison Friday on charges of producing child pornography.

Justin Coleman, 36, of Falls Church, pleaded guilty in August to two counts of producing child pornography, but authorities said those films were just a small part of a vast collection of sexually explicit movies he had created of young girls.

“Mr. Coleman, you are a bad seed,” United States District Judge Gerald Bruce Lee said during the sentencing. “You are a danger and a predator to our children.”

An investigator said he had never seen a more “profoundly disturbing” case in his career.

Coleman admitted to producing videos of himself engaging in sexually explicit conduct with two prepubescent girls.

Authorities also said that Coleman altered more than 2,500 images of existing child pornography to depict former female students engaged in the acts and recorded at least 74 videos in the classroom.

The videos included recordings of Coleman masturbating behind an unaware student, and videotaping up girls’ skirts, down their shirts and on their buttocks, authorities said.

Coleman titled some of the movie files with the names of students depicted in the videos, authorities said.

Coleman was arrested in April, when he acknowledged that he had downloaded and viewed inappropriate images of young girls for “a long time.”

According to court papers, he had a pair of girls’ pink underwear in his pocket when agents arrested him.

Coleman, who taught at the school since 2005 and was dismissed last spring, was among 900 individuals in the United States identified by Italian law enforcement as part of an overseas child pornography investigation.

The images and videos of students were part of a larger collection of more than 75,000 child pornography photos and 1,000 child pornography movies, court records showed.

Peter Greenspun, an attorney for Coleman, had asked the court for a 15-year sentence, saying Coleman was mentally ill and had cooperated with investigators.

In court, Coleman, who was wearing a green prison jump suit, apologized to the girls he hurt, to his family and said he planned to seek treatment in prison.

“Knowing what I have done makes it next to impossible for me to look in the mirror,” Coleman said.