BUCHAREST (Reuters) - Romania has put the finishing touches to a plan to overhaul the judiciary that critics say erodes judicial independence and which will have to be discussed with the European Union.

When the scheme was first outlined in August, Brussels asked government for more details, expressing concern it may be a step backwards in the country’s fight against corruption.

The plan, also questioned by the president, magistrates and diplomats, was announced just six months after the Social Democrat-led (PSD) government attempted to weaken a crackdown on graft, triggering Romania’s largest street protests in decades.

Justice Minister Tudorel Toader gave no details of the new contents of the draft, but the original announcement included giving the minister control over the judicial inspection unit, currently managed by an independent magistrates’ watchdog (CSM).

Critics say that would mean the minister could put pressure on judges. More than 3,500 magistrates across the country have signed a petition, asking the minister to withdraw the plan.”The ministry has finalised the bill. We’ve written a request for an opinion from the Venice Commission ... there will also be a discussion with Frans Timmermans on Oct. 26,” Justice Minister Tudorel Toader told reporters on Wednesday.

The Venice Commission is part of the Council of Europe rights body. Timmermans is the European Commission’s vice president.

Romania is seen as one of the bloc’s most corrupt member states and Brussels keeps its justice system under special monitoring together with southern neighbor Bulgaria.

In fellow former Communist country Poland, an overhaul of the judiciary, coupled with a government drive to expand its powers in other areas, including control of media, has provoked a crisis in relations with the European Union.

Other changes outlined in August in Romania included the way in which chief prosecutors are appointed, so it would be the justice minister naming them rather than the country’s president, who is traditionally above party politics.

However, the PSD leader Liviu Dragnea said on Tuesday he would not favor stripping President Klaus Iohannis from the chain of appointing the top prosecutors, suggesting that might be watered down in the final version.

The bill is expected to go to parliament’s legal commission for debate.

Last week, the government reshuffled the cabinet after Prime Minister Mihai Tudose said corruption allegations that forced two ministers to quit had created problems for his government with Brussels.

Dragnea was himself convicted in a vote-rigging case in 2016 for which he received a suspended jail sentence.

But controversy surrounding the PSD did not stop it from winning the 2016 election with support from voters in the countryside and those nostalgic for the communist-era who are more interested in pensions and wages rather than in a fight against graft.