|By Ahmed Aboulenein

|By Ahmed Aboulenein

CAIRO (Reuters) - Egyptian President Abdel Fattah al-Sisi appointed on Wednesday a new chief for a judicial body that defied him by blocking a controversial border treaty with Saudi Arabia, in what some judges said was an assault on judicial independence.

Sisi issued a decree appointing Judge Ahmed Abo al-Azm as Chief Justice of the Council of State, a judicial body that provides the government and parliament with legal advice and functions as the administrative judiciary, effective July 20.

An administrative court had blocked a widely criticized agreement that cedes sovereignty over two uninhabited Red Sea islands to Saudi Arabia and the Supreme Administrative Court, the Council of State's top court, upheld the verdict after the government appealed.

The government pushed the deal through parliament, ignoring the verdict, and claimed the matter was not for the judiciary to decide, and Sisi ratified it last month.

Judge Yehia al-Dakroury, who issued the initial verdict blocking the deal in June 2016, would have normally been next in line to become Council of State Chief Justice.

In the past, top judicial appointments were made in a way where leadership passed to a court's most senior member and the president signed off in a largely ceremonial role.

But a law that Sisi ratified in April now allows him to appoint the chiefs of top courts, a move judges said would erode their independence.

"The law is seen as unconstitutional, many see it as an encroachment from executive on judicial branch. The constitution is clear that the judiciary is independent and should manage its affairs, including picking its own leaders," Ahmed al-Khatib, a former judge at the Cairo Court of Appeals, told Reuters.

Egypt's judiciary has long enjoyed a degree of independence but a Reuters investigation revealed last year a crackdown that started in 2014 aimed at bringing it under tighter government control.

Dakroury told Reuters he would appeal against Sisi's decision not to appoint him as Chief Justice.

A Justice Ministry spokesman declined to comment on the matter. Abo al-Azm could not be reached for comment despite repeated phone calls.