A man in Massachusetts was arrested on Friday after allegedly making an online bomb threat to an election official working in the Arizona Secretary of State’s Office.

James Clark, 38, allegedly made the threat about Feb. 14, 2021, through the Arizona Secretary of State website contact form, which was addressed to an election official.

Clark said that the attorney general needed to "resign" or else a bomb would be set off in the election official's office on Feb. 16, 2021, according to the Department of Justice.

"Your attorney general needs to resign by Tuesday, February 16th by 9 am or the explosive device impacted in her personal space will be detonated," the message said, according to the DOJ.

STEVE BANNON FOUND GUILTY OF CONTEMPT OF CONGRESS FOR IGNORING JAN. 6 HEARING SUBPOENA

Arizona election official

Votes wait to be counted by staff at the Maricopa County Elections Department office. (Photo by Courtney Pedroza/Getty Images)

An indictment also alleges that Clark made an online search for "how to kill" the election official as well as online searches for "fema boston marathon bombing" and "fema boston marathon bombing plan digital army," according to the indictment. 

He was charged with one count of perpetrating a bomb hoax, one count of communicating an interstate threat, and one count of making a bomb threat.

Clark faces a maximum sentence of up to 10 years in prison if convicted of making a bomb threat and up to five years for each count of perpetrating a bomb hoax and communicating an interstate threat.

ATTORNEY GENERAL MERRICK GARLAND STOPS SHORT OF CALLING CRIME WAVE A CRISIS: 'MATTER OF CONSIDERABLE CONCERN'

Assistant Attorney General Kenneth A. Polite, Jr. said that incidents like this put election workers at risk.

"Illegal threats of violence put election officials and workers at risk and undermine the bedrock of our democracy: free and fair elections," Polite, Jr. said. "Our Election Threats Task Force, working with partners across the nation, will continue to vigorously investigate and prosecute illegal threats like these to hold accountable those who threaten our democracy."

CLICK HERE TO GET THE FOX NEWS APP 

The Federal Bureau of Investigations is investigating the incident.