A York man has been charged with purloining the email addresses of local officials to send messages containing threats of sexual violence and fake bomb threats.

Austin Santoro, 22, also allegedly sent messages laced with racial epithets and Ku Klux Klan references from emails associated with York County Community College and Boston University.

The investigation by the U.S. Department of Homeland Security that led to Santoro’s arrest began on Jan. 30 when three female members of the Portsmouth, New Hampshire police department received sexually explicit emails that purported to be from police Chief Robert Merner, according to a court affidavit. Merner denied sending them.

In one dated Feb. 18, the sender said, “Hey guys, Bim bam boom! There’s a bomb in the building! Come find it before it goes off! Thanks, Robert Merner.”

The affidavit included a similar emails that used a York County Community College email address.

In addition to those emails, between Dec. 21, 2017 and Jan. 30, Santoro allegedly sent 10 using York police emails; three using Kittery police emails; seven using Boston University emails; eight using York Community College emails; seven using Town of York emails; and one using a York school district email. The emails were sent to addresses within the same organizations from which he allegedly stole the accounts.

One of the emails sent to Boston University addresses purported to be from kkk@bu.edu, the affidavit said.

“All Mud races will be exterminated !” it allegedly said. “No longer will the white race face cultural genocide! White generations of the future will flourish without monkeys on the street.”

The email included a photograph of a hooded and robed KKK member, the affidavit said. It was signed, “Loyal White Knights Knights of The Ku Klux Klan.”

York County Community College confirmed that Santoro registered for online courses last semester and this semester, the affidavit said. All emails sent to YCCC addresses purported to be from one faculty member who flunked Santoro in a course last semester.

Forging an email header so the message appears to have been sent by someone or from somewhere other than the actual source is called spoofing, according to the U.S. attorney’s office, which is prosecuting the case.

Santoro was arrested Thursday and charged with five counts of transmitting threatening communications, two counts of maliciously conveying false information concerning use of an explosive, and four counts of identity theft.

U.S. Magistrate Judge John Rich III ordered that Santoro be held temporarily without bail.

Santoro was then released Tuesday on $100,000 unsecured bail with conditions that he live with his parents in York. His access to the internet also is restricted.

Santoro is represented by Federal Defender J. Hilary Billings. It is the practice of the federal defender’s office not to comment on pending cases.

If convicted, Santoro faces up to five years in federal prison for sending the threats, up to 10 years in prison for sending false information about the use of an explosive and up to 20 years in prison on the identity theft counts.

Follow the Bangor Daily News on Facebook for the latest Maine news.