PRAGUE (AP) — Thousands of Czechs are rallying in Prague and elsewhere to protest the proposed replacement of the justice minister.

The protesters said Monday that might compromise the legal system at a time when prosecutors have to decide whether to indict Prime Minister Andrej Babis over alleged fraud involving European Union funds.

Babis denies wrongdoing.

The justice minister has significant control over the prosecution. The minister to be appointed Tuesday is Marie Benesova, a lawyer and adviser to President Milos Zeman, Babis’ close ally. Zeman has repeatedly criticized the prosecution.

As a lawmaker, Benesova voted against a police request to strip Babis of parliamentary immunity to face investigation. The protesters and the opposition say Benesova might try to influence his case.

A union of judges also expressed doubts about the change.