JOHANNESBURG (Reuters) - South Africa’s High Court in Pretoria said on Friday that the appointment of Berning Ntlemeza as head of an elite police investigation unit is unlawful and must be revoked.

Ntlemeza was appointed in 2015 to lead the powerful Directorate of Priority Crime Investigation, known as the Hawks.

Critics have accused the unit of sometimes carrying out politically motivated probes to discredit those who have fallen out of favor with President Jacob Zuma and his inner circle.

“Our take is very simple: we will abide by the ruling,” Hawks spokesman Hangwani Mulaudzi told Reuters.

Two local non-governmental organizations, Freedom Under Law and the Helen Suzman Foundation, had applied to the court to have Ntlemeza removed on the grounds that he was not fit to hold the office.

On its website, Freedom Under Law said: “The appointment was irrational and unlawful as there have been damning findings by the courts against (Ntlemeza’s) integrity.”

The Hawks’ integrity has been questioned by the local media and NGOs after it played a role in a graft case against Finance Minister Pravin Gordhan, which critics say was part of a political agenda. Charges in that case were withdrawn last year.