A Sheridan man who wanted to "'buy time'" last June with the county attorney's office by torching it a day before a court hearing could face at least 47 years in federal prison.

Joel Elliott, 37, pleaded not guilty to arson of a building receiving federal funds and four other counts during his arraignment before U.S. District Court Magistrate Judge Michael Shickich in Casper on Friday.

Elliottt's trial is set for June 1 before U.S. District Court Judge Scott Skavdahl in Casper. He remains in custody.

According to the criminal complaint filed in federal court on Feb. 27, the Sheridan County Attorney's Office was prosecuting Elliott for felony stalking of a former girlfriend and felony forgery. Elliott was scheduled to change his plea in the forgery case on June 5, which would have lead to the loss of his firearms rights.

Meanwhile, he had anger issues.

"Elliott was mad at two prosecutors who work at the Sheridan County Attorney's Office because these two prosecutors had a friendship with (the woman) and he believed that the prosecutors were treating him unfairly because of their relationship with (her)," according to the criminal complaint.

Early June 4, Elliott allegedly shut off the power to the attorney's office building, entered it, poured gasoline throughout the building, and left an incendiary device to ignite the vapors after he left. He built the device with batteries, black powder, a rocket motor, a piece of pipe, wire, electrical tape, a Westclox brand Style 8 Baby Ben mechanical alarm clock, and other materials, according to the criminal complaint.

Investigators spoke with the a Sheridan county official who said the county had received more than $2 million in federal money from 2011 through 2013, and some of that was used to improve security at the county attorney's office.

Elliott told a grand jury in November that another person had burned the office building, according to the indictment filed with the court on March 19.

But he later told a confidential informant he was careful in building the device because he wore rubber gloves, according to the criminal complaint. "Elliott also admitted that he set the fire to 'buy time' on the pending case he was charged with by the Sheridan County Attorney's Office at the time of the fire."

Elliott faces five counts: arson of a building receiving federal funds; using a firearm during and in relation to a crime of violence; using fire or an explosive to commit a felony; possession of an unregistered firearm; and false declaration before a grand jury.

If convicted, the arson charges carries a minimum of seven to forty years imprisonment. If that happens, and he's convicted of using a firearm (in this case an explosive device), that adds 30 years to life imprisonment. And if convicted on those two counts, conviction of using fire to commit a felony adds another 10 years.

The possession of an unregistered firearm is punishable by up to 10 years imprisonment. Lying to the grand jury is punishable by up to five years imprisonment.

If convicted on all counts, Elliott also faces up to a $1.25 million fine.