CAIRO (AP) — The legal adviser of Egypt’s Islamist President Mohammed Morsi resigned Tuesday, alleging that the Muslim Brotherhood has monopolized decision-making and encroached on the governing of the country.

The resignation letter by Mohammed Fouad Gadallah brought the harshest criticism yet from inside the presidency. Opponents of Morsi have long accused the Brotherhood of being the real power behind the president and say the group’s attempts to dominate power have fueled the country’s turmoil.

Morsi, who hails from the Brotherhood, denied in a TV interview earlier this week that the group intervenes in decision-making.

The resignation comes amid a mounting dispute between Morsi’s Islamist supporters and the judiciary, which is the sole branch of government not dominated by Islamists.

Brotherhood officials and other Islamists accuse backers of the regime of ousted autocrat Hosni Mubarak in the courts of blocking the country’s transition to democracy and are discussing a law they say will ensure the judicary’s independence. But opponents fear they aim to take over the courts and purge secular-minded judges to consolidate Brotherhood power.

Two days earlier, Justice Minister Ahmed Mekki, an Islamist supporter, submitted his resignation, complaining that Morsi supporters were “trampling” on the judiciary. He too criticized the president’s handling of the dispute with the judiciary and failure to reach out to critics.

The opposition and judges threatened to escalate their fight against the new legislation, while Morsi said he doesn’t accept any encroachment on the judiciary.

Gadallah, who is not a member of the Muslim Brotherhood, served as Morsi’s legal adviser since July. Presidential spokesman Ihab Fahmy confirmed that the resignation was submitted and said it was under review. He offered no other details. An email to the presidency seeking further comment was not answered.

In his three-page resignation letter, Gadallah said he wanted to shed light “on the extent of the danger facing the country,” at a time when “personal interests are overwhelming national interests.”

He said there is “no clear vision” in running state affairs and that “a single (political) current” monopolizes decision-making, excluding experts and the opposition. He also pointed to the current dispute over the courts, complaining of attempts to “assassinate the judiciary.”

He said he had long been concerned over “the slowness of decision-making and monopolization by the Brotherhood and its encroachment on the president and governing.” But he said that he had previously held back from resigning or going public with his objections out of respect for Morsi.

Gadallah said he advised Morsi against some of a series of controversial decrees the president issued in November that sparked a heavy public backlash and galvanized the opposition.

Particularly, he said he opposed a decree that temporarily granted Morsi’s decisions immunity from judicial review, but he said his opinion was ignored. After the public outcry, some Brotherhood members had blamed Gadallah for those decrees.

Brotherhood spokesman Yasser Mehrez dismissed Gadallah’s claims of the group dominating rule, telling the online version of Al-Ahram newspaper, “it seems (he) has been influenced by what the opposition says about Brotherhoodization.”

Mehrez also said the envisioned law on the judiciary was in line with demands many, including Gadallah, have made for reform, contending that judges who protected the Mubarak regime are leading the resistance to the new law.

Gamal Heshmat, a lawmaker from the Brotherhood’s Freedom and Justice Party, said the group appreciates Gadallah’s opinion on legal matters the presidency consults him on. “But he should only stick to what he knows,” Heshmat said.

Egypt has been deeply divided for months over Morsi’s rule and the political dominance of his Islamist allies, leading to repeated violence even as the country’s economy continues to deteriorate.

In a quick reaction to Gadallah’s resignation, opposition leader Mohammed ElBaradei said he held Morsi and his supporters responsible for the polarization that is tearing the country apart.

Islamists have pointed to a number of recent cases in which Mubarak-era officials have been cleared of charges as evidence of the need to reform the judiciary.

On Tuesday, a court convicted a former finance minister, Yousef Boutros-Ghali, on charges of squandering around $3.6 million during his final years in his post. The court sentenced him to 25 years in prison. Boutros-Ghali, a nephew of former U.N. Secretary-General Boutros Boutros-Ghali, is believed to be in London.

Because he has been tried in absentia, he is allowed a retrial and all verdicts can be overturned upon his return.