JERUSALEM (AP) — Israel's attorney general on Friday warned Prime Minister Benjamin Netanyahu that he has violated the Supreme Court's conflict of interest ruling, which barred him from direct involvement in his government's divisive plans for a judicial overhaul.

Netanyahu’s far-right government has barreled ahead with plans to weaken the Supreme Court and grant politicians less judicial oversight in their policymaking despite massive protests from across Israeli society — including an uproar among business leaders, top legal officials and military reservists. On Thursday, just hours after his coalition passed a law that would protect the Israeli leader from being deemed unfit to rule because of his corruption trial and claims of a conflict of interest, Netanyahu defiantly pledged to proceed with the overhaul.

Netanyahu contended that stripping the attorney general of the power to remove him from office was necessary to clear the way for him to participate in the negotiations on the judicial overhaul in spite of her instructions, and try to “mend the rift” in the polarized nation.

“Until today my hands were tied,” Netanyahu said in a prime-time TV address Thursday, referring to the change in the law on removing a prime minister.

Attorney General Gali Baharav-Miara thoroughly disagreed, sharply criticizing him in a letter Friday for violating a conflict of interest agreement that had allowed him to continue leading the country while charged with corruption, bribery and breach of trust. The deal Netanyahu was pressed to sign in 2020 prevented him from being involved in legislative issues or key judicial appointments that could affect his ongoing trial.

“Your statement last night and any further actions by you that violate that agreement are completely illegal and in conflict of interest,” Baharav-Miara wrote in Friday's letter. “The legal situation is clear — you must avoid any involvement in measures to change the judicial system.”

The contentious law that makes it harder to remove Netanyahu from office, passed late Wednesday by a slim majority of 61 in the 120-seat parliament, does not undo the court's earlier conflict of interest ruling, Baharav-Miara said. The consequences of Netanyahu's violations of the agreement were not immediately clear.

Netanyahu, on an official visit to Britain, did not immediately respond to her letter.

The Movement for Quality Government in Israel, a good governance organization, warned of a constitutional crisis. It pledged to file a petition urging that Netanyahu be held in contempt of court. “A prime minister who does not obey the court and its orders is an anarchist,” the group said.

Supporters of the judicial overhaul say it will restore power to elected legislators and make the courts less interventionist. Critics say the move upends Israel’s system of checks and balances and pushes it toward autocracy.