A north Georgia magistrate charged with drug use, pointing a gun at himself in the courthouse and berating his boss in a bizarre televised rant blames his strange behavior on prescription drug abuse after a devastating ATV accident, his attorney said Thursday at a state hearing.

Catoosa County Magistrate Judge Anthony Peters started using painkillers after the 2005 accident and within a few years his behavior was so alarming that his boss tried to put him on a night shift so he could avoid most staffers, prosecutors told the Judicial Qualifications Commission.

His refusal to work the shift led to a heated argument with Chief Magistrate Sonny Caldwell and he was removed from the county courthouse in handcuffs, prosecutors said. He then went on a local talk show, called Caldwell “spineless,” and showed off a photo of a confidential informant to the show’s viewers.

“That’s a serious breach of protocol, of ethics and of commonsense,” said Joe Hendricks, a north Georgia district attorney who was tapped to try the case. “And it put people in danger.”

Defense attorney Chris Townley said Peters’ judgment was “cloudy” for a few months in 2010 while using marijuana to try to wean himself off from pain pills, but that he’s since cleaned up his act. He urged the commission to let his client keep his job.

“Comments were made that should not have been made,” said Townley, who said new treatment and a lengthy suspension gave Peters time to rehabilitate himself.

“It gave him a chance to refocus. It gave him a chance to re-center. And it gave him a chance to reflect on his life,” Townley said. “He’s a different person than he was a year ago. He wasn’t the person who was on TV.”

The commission, which investigates judicial misconduct allegations, is expected to issue a decision after the hearing concludes on Friday.

Peters was a detective for the county sheriff’s office for 10 years before he was picked in 1997 to be a magistrate judge. Although he’s not an attorney, he devoted himself to learning the law and soon became the “go-to-guy” in court while Caldwell took up more administrative duties, Townley said.

But Peters’ demeanor started changing after a rocky 2005, which began when his father committed suicide and grew worse after the ATV accident. The magistrate started taking heavy doses of pain medications by 2009 after surgeries didn’t ease the pain, his lawyer said.

“He hated the way they made him feel, but he hated the way he felt if he wasn’t taking them,” Townley said.

Prosecutors say Peters behavior took a turn for the worse that year. In February 2009, they say he went to a local house to help a relative, identified himself as a magistrate and then illegally kicked down two doors. In spring 2009, they say he pointed a gun at himself at the courthouse and told another judge: “I am not scared. Are you?”

Courthouse workers began to complain about Peters. He had shaved his head and eyebrows, was openly talking about suicide and asking defendants inappropriate questions about drug and alcohol use, Hendricks said. When officials tried to make him work a later shift and he refused, Hendricks said Peters was so infuriated he took to the airwaves with his complaints.

He accused Caldwell of misconduct on the local talk show and, a day later, called into the same show and tried to disguise his voice with a range of bewildering phony accents (one sounded oddly like Elmer Fudd, Hendricks said). After his cover was blown — caller ID gave him away — Peters lashed out at the county sheriff, calling him a “jelly spine.”

Since then, Peters has started to rebuild his life, Townley said. He had successful surgery in July that relieved most of his pain, he’s learned to limit his use of pain pills and now he’s ready to return to the bench, the attorney said.

“Being a judge matters to him almost as much as anything in his life.”