TIRANA (Reuters) - Albania’s highest court upheld on Thursday a law to vet judges and prosecutors for possible corruption, paving the way to enforce legislation the European Union requires before starting accession talks with Tirana.

Edi Rama, Prime Minister of Albania, addresses attendees during the 70th session of the United Nations General Assembly at U.N. Headquarters in New York, October 2, 2015. REUTERS/Mike Segar

The government and opposition parties unanimously passed the law before the summer break after 18 months of quarrelling, but the opposition then challenged it on the grounds it could help the government control the judiciary rather than make it free.

Both the EU and the United States helped draft the reform of the judiciary, which a survey found 91 percent of Albanians saw as corrupt.

The EU wants the judiciary in the ex-communist Balkan state to become truly independent, able to fight endemic corruption and organized crime, and also to end impunity for politicians.

The Constitutional Court, which had also asked the opinion of the Council of Europe’s advisory body on constitutional matters, did not offer an explanation in its statement announcing that it had rejected the opposition’s appeal.

“They delayed it but did not stop it,” Prime Minister Edi Rama said of the opposition’s challenge to the law. “Now it is the time to see it in action.”

Pledging to respect the ruling, the opposition Democratic Party added it still strongly believed the current law would put the vetting of judges and prosecutors under Rama’s thumb.

The vetting law, which still requires parliament to set up the bodies that would make it work, would look into the wealth and record of judges and prosecutors to weed out corrupt ones.

Should the vetting of judges and the judiciary overhaul get going and produce results next year, the European Commission could at any time signal its satisfaction to EU member states and advise them that Albania is ready for accession talks.

Albania holds parliamentary elections in June next year.