By Kim Chandler, The Associated Press

MONTGOMERY, Ala. — Alabama Chief Justice Roy Moore was removed from the bench Friday for defying the U.S. Supreme Court on gay marriage, more than a decade after he was ousted for disobeying a federal order to take down a 2 ½-ton monument to the Ten Commandments.

The nine-member Alabama Court of the Judiciary suspended Moore for the remainder of his term. Although the court stopped short of outright removing him as they did in 2003, the punishment has the same effect, ending his period as Alabama’s top jurist.

The judiciary court ruled that Moore defied law already clearly settled by the high court’s Obergefell vs. Hodges ruling when he told Alabama’s probate judges six months later that they were still bound by a 2015 state court order to deny marriage licenses to gays and lesbians.

“Beyond question, at the time he issued the January 6, 2016, order, Chief Justice Roy Moore knew about Obergefell and its clear holding that the United States Constitution protects the right of same-sex couples to marry,” the court wrote in the unanimous decision.

They said Moore also flouted a federal judge’s order that enjoined the judges from enforcing Alabama’s same-sex marriage ban after the U.S. Supreme Court’s decision.

The 50-page decision indicated that a majority of justices wanted to completely remove Moore, not just suspend him without pay, but they lacked unanimous agreement.

Moore told The Associated Press in a telephone interview that he was shocked by the decision.

“I think it’s clear it was politically motivated,” he said.

In a separate statement, Moore called his removal “a politically motivated effort by radical homosexual and transgender groups to remove me as chief justice of the Supreme Court because of outspoken opposition to their immoral agenda.”

With Moore’s punishment, leaders of two of Alabama’s three branches of government have been removed for ethics violations this year, and a third is possible. The Republican House speaker was removed this summer. A legislative committee is weighing whether Gov. Robert Bentley should be impeached over a scandal involving a top aide.

The president of the civil rights organization that filed complaints against Moore in 2003 and 2016 praised the decision as a victory for the state.

“Moore was elected to be a judge, not a preacher. It’s something that he never seemed to understand,” said Richard Cohen, of the Southern Poverty Law Center.

“My parting words are good riddance to the Ayatollah of Alabama,” Cohen said.

Moore’s attorney, Mat Staver of Liberty Counsel, called it a “miscarriage of justice” and said they will appeal to the Alabama Supreme Court.

“The rule of law should trump political agendas. Sadly, today that is not the case. What this decision tells us today is that Montgomery has a long way to go to weed out abuse of political power and restore the rule of law,” said Staver, who also represented Kentucky clerk Kim Davis in her refusal to issue marriage licenses to gay couples.

Moore, 69, had already been suspended from the bench since May, when the state’s Judicial Inquiry Commission accused him of violating judicial ethics. By the end of his term in 2019, he’ll be beyond the age limit of 70 for judges, unless voters raise the limit in November.

The Republican judge has long been a polarizing figure, known for conservative legal views that sometimes seem to mix with theology.

Soon after his first election as chief justice, he installed the boulder-sized Ten Commandments monument in the rotunda of the state judicial building. Moore called the federal judge’s order to remove it unlawful and said it infringed on his right to “acknowledge God.”

Moore’s stands have won him loyal followers and passionate critics. Supporters gave him a standing ovation as he entered the ornate courtroom to testify on Wednesday, while critics waved rainbow flags and signs outside saying “Y’all means All,” and more simply, “Bye.”

Testifying in his defense, Moore contended that his January order merely intended to clarify that the Alabama Supreme Court still had to decide what to do with its earlier order upholding the state’s gay marriage ban in light of the Obergefell decision.

“All of told them was the order was still in effect,” Moore said Friday, adding that he “didn’t tell them to disobey” the federal injunction against Alabama’s same-sex marriage ban.

But lawyers for the Judicial Inquiry Commission told the court that Moore — who once referred to judicial rulings allowing gay marriage as “tyranny” — had been on a mission to block gay marriage in Alabama.

“The Chief Justice learned nothing from his first removal. He continues to defy the law,” attorney John Carroll argued.