ANKARA (Reuters) - Turkey’s parliament approved sweeping plans late on Thursday to restructure the high courts, in a victory for President Tayyip Erdogan that critics say will allow him to remove troublesome judges and tighten his grip over the judiciary.

Turkish President Tayyip Erdogan, accompanied by his wife Emine Erdogan, greets supporters during a rally to mark the 563rd anniversary of the conquest of the city by Ottoman Turks, in Istanbul, Turkey, May 29, 2016. REUTERS/Murad Sezer

The ruling AK Party has said the law will clear bottlenecks in the legal system. But opponents see it as giving Erdogan even more power at a time when he is seeking a constitutional change to introduce an executive presidency.

The main opposition CHP said it would launch an appeal at the Constitutional Court, although the success of that challenge looks doubtful.

The European Union has repeatedly raised concerns about the erosion of judicial independence in Turkey, with officials warning it is taking the country away from European standards and further undermining its already strained EU membership bid.

Under the new law, most of the 711 judges at two of the highest courts - the Council of State, which hears cases lodged by citizens against the government, and the Supreme Court of Appeals - will be removed. It is not clear how many of them will be reappointed.

There will be fewer judges and new appointments will be carried out by the High Council of Judges and Prosecutors (HSYK), which oversees judicial appointments and falls under the control of the Justice Ministry.

Erdogan will also be able to appoint a quarter of the judges at the Council of State, allowing him to stack one of the country’s most important legal bodies with his allies.

The AKP says the law will reform a high judiciary swamped by as many as two million cases, some waiting for years to be heard.

The reforms come on top of an unprecedentedly large reshuffle last month of the HSYK, which saw 3,700 judges and prosecutors reassigned, sparking accusations of a witch hunt.

The courts have already become more loyal to Erdogan’s agenda, his opponents say, since large-scale purges in the judiciary following a corruption scandal in 2013.

Sources said the HSYK was likely to implement the new appointments as soon as possible, meaning any ruling from the Constitutional Court to cancel the law would not be able to reverse the changes.