The state Supreme Judicial Court dismissed Barnstable District Clerk Magistrate Robert E. Powers from his position Friday, saying that "the public good requires his removal."

The decision ends a 17-month inquest into Powers' conduct during his five years at the court.

"The record demonstrates that from the date he started work at the Barnstable District Court through the time of the hearing, Powers fundamentally failed to do his job," Associate Justice Ralph D. Gants wrote in the decision.

Powers, 60, has been under scrutiny since the state Committee on Professional Responsibility for Clerks of the Court, which oversees conduct for clerks statewide, issued formal charges against him in January 2012 for failing to perform his duties as clerk magistrate. The committee cited Powers' tardiness to work, inability to render timely decisions on cases and his "unpredictable, disrespectful and sometimes aggressive conduct" as grounds for the charges.

Powers was appointed to the $110,000-a-year job in 2007 by Gov. Mitt Romney days before Romney left office. The position is a lifetime appointment and has no compulsory retirement age.

Powers was reassigned to Taunton District Court in January 2012 in the wake of the formal charges. He has been there since, and his job status at that court is unclear. According to the personnel policy of the state trial court division, an employee cannot be appointed or reinstated to a position if he or she has been discharged for cause.

"I think the integrity of the judicial system has been maintained," said Boston attorney Thomas Bean, who represented the Committee on Professional Responsibility.

In its decision, the high court found there was sufficient cause for Powers' removal presented at a six-day hearing at Barnstable Superior Court in March and April 2012. In that hearing, witnesses — including high-ranking judges, lawyers and court staff — recalled their experiences with Powers during his tenure.

Many described instances in which Powers yelled at, demeaned and belittled them, often in front of a packed courtroom or office.

Witnesses from Barnstable District Court expressed their view that it would be impossible for Powers to return after such abuse. This was echoed by the justices in the ruling.

"... His mistreatment of the clerk's office staff has created an environment where they are embarrassed by him and uncomfortable with his presence, rendering it difficult for the office to run effectively if he were to return as clerk magistrate," Gants wrote.

The ruling noted that Powers had been given several opportunities to change his behavior but he failed to make the effort.

Several months after the Barnstable hearing, the hearing officer, retired Judge Gordon Doerfer, issued his findings to the committee as well as a recommendation that Powers be removed from office for misconduct.

The committee held its own hearing and then recommended removal to the high court, which gave Powers a final opportunity to plead his case at a third hearing in January.

Lawyers and court staff discussed the ouster Friday as the news circulated through Barnstable District Court.

"We're relieved we can move on now. It's done. Maybe now we can get a real clerk magistrate," said one clerk who declined to be named.

In his defense, Powers argued that he had been denied due process because the committee denied him a chance to appear before it when the charges first came down. The high court determined that although the committee should have granted the appearance, Powers' rights were not infringed.

The justices also discounted Powers' other argument that he should not be removed because his conduct did not involve an act of "moral turpitude," which has formed the basis for other dismissals.

"We need not consider whether any of these findings involves some degree of moral turpitude because we do not accept Powers' suggestion that he can keep his job, despite failing effectively to perform it for more than four years, as long as he avoids acts of moral turpitude," the court ruled.

Powers' replacement must be appointed by the governor and approved by the Governor's Council. Charles Ardito III is serving as acting clerk magistrate.