An Augusta man pleaded not guilty Thursday in federal court to an indictment charging him with threatening to kill both President Barack Obama and U.S. Rep. Chellie Pingree, D-1st District.

Peter M. Hamilton, 66, who also is known as Peter William Merriman and Peter Merriman Hooper, was ordered held in federal custody after his arraignment Thursday in U.S. District Court in Bangor. The hearing was held via video, and it was unclear where Hamilton was.

Hamilton was represented by attorney James Nixon.

According to the six-count indictment, Hamilton made a series of threats about Obama and Pingree.

It says that on May 28, 2014, he threatened to travel to Pingree’s home and kill her and on Sept. 30, 2014, wrote a note to that effect, saying “Shelly (sic) Shouldn’t be a representative in this state.”

On March 30, 2014, he threatened both her and Obama by stating “Kill Chellie Pingree! Kill Her! Kill President Obama Kill him! I’m gonna kill them!”

The final count says that on May 1, 2016, Hamilton threatened Obama by saying, “I hate this country. … I’m moving to Canada. … I’m going to get a gun and kill President Obama.”

The indictment was handed up by a federal grand jury on July 13, 2016, and unsealed after Hamilton’s arrest.

The two charges of threatening “to take the life, kidnap and inflict bodily harm upon the president of the United States” carry maximum terms of imprisonment of 10 years. The four charges of threatening “to assault and murder with intent to impede, intimidate and interfere” against Pingree carry five-year maximum terms.

In seeking to have Hamilton held without bail, Assistant U.S. Attorney Chris Ruge wrote, “The threats by the defendant have been repeatedly witnessed and documented by healthcare providers, and many of the threats were issued by the defendant in his own handwriting. These writings detail the nature of the violence he threatens to employ, deride the job performance of the victim official, and express general contempt for the United States.”

Ruge also said Hamilton has a history of making “graphically violent death threats against public officials” and been convicted of being a felon in possession of a firearm. “He has been repeatedly committed to state custody because of the substantial danger he poses to himself and others.”

Ruge said Hamilton is being held in state custody through a civil commitment process and was to be released Nov. 24, 2016, or sooner.

According to a news release from the U.S. Attorney’s Office, the case was investigated by the U.S. Secret Service and U.S. Capitol Police.