Romania's Constitutional Court ruled Wednesday that President Klaus Iohannis must approve the government's dismissal of the country's top anti-corruption prosecutor Laura Kovesi.
"Romania's president will sign the decree for revoking the chief prosecutor of the DNA (anti-corruption unit), Mrs. Kovesi", said the court in a press release, ruling that he did not have the power to refuse the request.
Iohannis has previously said that Justice Minister Tudorel Toader's reasoning for wanting to remove Kovesi contained "weak arguments" and had defended Kovesi's work as a prosecutor.
In response, the Romanian government took the case to the Constitutional Court.
The government accuses Kovesi of violating the constitution but her supporters say she has been targeted for investigating corruption among Romania's political elite.
Members of the ruling leftwing government welcomed the news, including the Senate President Calin Popescu-Tariceanum who said that Kovesi "should have resigned a long time ago".
However, the opposition centre-right -- to which Iohannis belongs -- said the court's decision, made by six votes to three, "deals a heavy blow to the court's credibility".
Hundreds have already said that they will attend a demonstration in Bucharest in support of Kovesi and to "defend democracy and justice".
Held up by her supporters as a symbol of the fight against corruption in Romania, the 44-year-old former basketball player was named head of the DNA in 2013 by former President Traian Basescu.
She was then re-appointed by Iohannis for a final three-year term in 2016.
Toader launched the procedure to sack Kovesi in February, accusing her among other things of "damaging the image" of Romania by criticising the government's judicial reforms.
As well as sparking huge street protests at home, those reforms have raised worries abroad that Romania may be backsliding in its fight against corruption.
The European Commission also opposed the reforms, saying they could undermine judicial independence and the fight against corruption.
More than 108,000 people had signed an online petition calling on Iohannis not to dismiss Kovesi.
Earlier this year Kovesi said the agency had investigated a record number of cases in 2017, despite "unprecedented attacks" by political authorities.
Romania is one of the most corrupt countries in the EU and the bloc has placed tight oversight mechanisms on its judicial system.