A Bangor man is facing charges after he allegedly threatened court officers with a cattle prod on Friday at the Penobscot Judicial Center.

Darryl Vaillancourt, 50, has been charged with criminal threatening with a dangerous weapon, a Class C crime, and criminal trespass, a Class E crime, according to Bangor police.

Vaillancourt raised the electrified and charged cattle prod and threatened to “bash the officer’s head in,” according to a court affidavit. Another judicial marshal used a stun gun to subdue him.

Vaillancourt was taken into custody shortly before 11 a.m. Friday at the Bangor courthouse on Exchange Street. 

He was taken to a local hospital before being transported to the Penobscot County Jail, police said.

Superior Court Justice William Anderson on Monday set bail at $3,000, twice what the Penobscot County District Attorney’s office recommended. Conditions include Vaillancourt not possessing dangerous weapons and not returning to the courthouse unless it is for his case.

The judge did not ask Vaillancourt to enter pleas to the charges because he has not yet been indicted by the Penobscot County grand jury.

Vaillancourt, who recently was evicted from his apartment, told Anderson he’d come to the courthouse to talk to the judge about issues facing the homeless in Bangor.

“I didn’t intend to hurt anyone,” Vaillancourt said.

He is next due in court on June 2.

If convicted, Vaillancourt faces up to five years in prison and a fine of up to $5,000 on the threatening charge and up to six months in jail and a maximum fine of $1,000 on the trespass charge.