TAMPA, Fla. (WFLA) — A federal judge announced a long-awaited decision on whether Hillsborough State Attorney Andrew Warren should be restored to office, ruling Friday that the ousted prosecutor cannot be reinstated, even though Gov. Ron DeSantis violated state law when he suspended him last year.

In August, DeSantis suspended Warren from Florida’s 13th Judicial Circuit, accusing him of neglect of duty after Warren signed pledges stating he would not enforce a new 15-week abortion law or prosecute providers of gender transition treatment for young people.

Warren was one of a number of other state attorneys and prosecutors from around the country who signed the pledges. He filed a federal lawsuit later that month, accusing DeSantis of abusing his power over the suspension from office.

During the three-day trial, which ended in early December, DeSantis’ lawyers argued Warren was removed due to his performance.

In his order, Judge Robert Hinkle wrote that the governor had violated the Florida Constitution, but said the matter could not be resolved in the federal court’s jurisdiction.

“The suspension also violated the Florida Constitution, and that violation did affect the outcome,” Hinkle wrote. “But the Eleventh Amendment prohibits a federal court from awarding declaratory or injunctive relief of the kind at issue against a state official based only on a violation of state law.”

“In sum, the transgender and abortion statements—with the exception of the one sentence in the abortion statement—were protected by the First Amendment,” the order continued. “These other factors could not properly be the basis for a suspension under the Florida Constitution—there were no blanket non-prosecution policies, no neglect of duty, and no incompetence.”

Hinkle added that “relief cannot be awarded in this federal action based solely on a violation of state law” and it was “of critical importance: a violation of state law is not, without more, a violation of the United States Constitution.”

Hinkle also said he thought Warren was being targeted for his political positions.

“It is not surprising that in this litigation, the Governor has not acknowledged that this was a factor in the suspension. But it plainly was,” the judge wrote. “The Governor was looking for a reform prosecutor from the outset.”

The judge ruled Warren was not entitled to relief in federal court because the case centers on alleged violations of the state constitution, putting the legal battle in the wrong jurisdiction.

The judge also dismissed claims DeSantis violated Warren’s rights under the First Amendment.

“Today the court upheld the governor’s decision to suspend Andrew Warren from office for neglect of duty and incompetence,” Taryn Fenske, the Communications Director for Gov. DeSantis, said in response to the ruling.

A representative for Andrew Warren responded to WFLA.com’s request for comment, providing a statement from the Public Rights Project, who has worked “in parallel” with Warren’s own legal counsel.

The statement from PRP said in part that “DeSantis should not get away with breaking the law.

“Today’s decision has laid the groundwork for a state court to reinstate Warren and conclude that DeSantis abused his power and violated the Constitution.” Warren’s representative noted that the suspended attorney could still appeal the decision in state court, as well as potentially run for reelection.