The Alabama Supreme Court on Friday overturned five of the ethics convictions that ended the political career of former House Speaker Mike Hubbard, while upholding six others.

The all-Republican court's long-awaited ruling in the corruption case against the once powerful Republican came ten months after justices heard arguments in the case and years after his conviction. Hubbard, 58, was sentenced to four years in prison in 2016, but has remained free on appeal.

Hubbard, the architect of the GOP’s takeover of the Alabama Legislature in 2010, was a legislator from Auburn and former chairman of the Alabama Republican Party. He was elected House speaker soon after the Republicans consolidated their control.

Prosecutors accused Hubbard of monetizing his public office to obtain clients and investments for his businesses. His defense lawyers maintained the transactions were all above-board.

The overturned counts dealt largely with several $150,000 investments in Hubbard’s troubled printing company. The court said that prosecutors failed to prove that investors didn't get a “full value for their money.”

“Although the company’s dire condition created a large element of risk in the investments, the potential for a commensurate return was, as confirmed by later events, real,” Chief Justice Tom Parker wrote in the majority opinion.

The court upheld other ethics counts involving Hubbard's side work as a consultant, rejecting defense claims that those contracts were unrelated to his position as House speaker. The state argued that Hubbard was hired only because of his political position, and therefore the pay he received violated the prohibition against giving a “thing of value” to an elected official.

Justices noted that when contacting a company for one client, Hubbard "identified himself as a state legislator and as Speaker of the House of Representatives."

“We’re disappointed and continuing to read through it. We’ll assess what our next step is after we have a chance to digest everything,” defense lawyer David McKnight said.

Hubbard could still face time in prison. McKnight said they “will certainly ask” the trial judge to reconsider the sentence, noting that a jury initially convicted Hubbard of 12 counts. The Court of Criminal Appeals tossed out one and the Supreme Court tossed out five more.

Hubbard was automatically removed from office with the felony conviction.

Alabama Gov. Kay Ivey said in a statement that she supports and accepts the “culmination of four years of deliberation.”

“As an elected official, our first priority is to be above reproach and avoid even the appearance of misconduct and abuse of office,” she said, adding that she's praying for the state "as we move on from this unfortunate part of Alabama’s history.”