A middle school teacher was arraigned before a federal judge Friday on charges of buying child pornography, federal court officials said.

William Villemez, 30, a former drama and dance teacher at Pace Academy in Buckhead, was indicted last week by a federal grand jury on charges that he paid for and downloaded to his computer video images of children in sexual situations, according to federal court records.

According to the indictment, between July 2008 and March 2011, Villemez had child pornography videos shipped to him.

Prosecutors claim he spent more than $750 for the 32 DVDs he had mailed to him.

Federal investigators obtained a search warrant for Villemez’s Smyrna home in October and found more child pornography downloaded on his computer, authorities said.

He could spend as many as 40 years in prison, if found guilty, along with facing fines equaling as much as $500,000, court officials said.

Villemez is currently out of jail on $40,000 bond.