BUCHAREST, Romania — Romania's top court says the president has no option but to fire the country's chief anti-corruption prosecutor, who's been praised for her efforts to root out high-level graft but has angered some politicians.

The constitutional court published a 133-page report Thursday justifying its earlier ruling that an institutional conflict had arisen after President Klaus Iohannis disagreed with the justice minister's assessment that National Anti-Corruption Directorate Chief Prosecutor Laura Codruta Kovesi should be dismissed on the grounds of failing to do her job properly.

The court called Iohannis' refusal to remove Kovesi illegal and unconstitutional.

Romania is one of the European Union's most corrupt nations. Kovesi is respected by ordinary Romanians and supported by the EU and the U.S.

There was no immediate response from Iohannis, who was on an official visit to Poland. Earlier this week, he said prosecutors should be independent and couldn't "be subordinate to any politician, even if it's the minister."