The Philippines’ top anti-corruption prosecutor, a fearless grandmother who was one of the few remaining critics of President Rodrigo Duterte in government, retired on Thursday, appealing for “strong institutions” over strong leaders.

Ombudsman Conchita Carpio-Morales, 77, finishes her seven-year term during which she earned Duterte’s ire for criticising his brutal drug war and for her office’s investigation into his alleged secret bank accounts.

Duterte, who accused Morales of “selective justice” and conspiring with opposition figures to oust him, last year threatened to have the retired Supreme Court justice impeached while launching tirades against her.

But a defiant Morales dismissed Duterte’s allegations as “fake news”, saying that his threats never intimidated her from doing her job.

“I know I am right in my own work so why should I be scared,” Morales said days before her retirement.

“As long as we have strong institutions, we don’t need strong people to run the government”, she added, emphasising the importance of independent bodies like her office.

Duterte, 73, has launched an unprecedented crackdown on drugs that has left thousands dead, sparking criticism from rights groups who say he may be orchestrating a crime against humanity.

The Filipino leader has lashed out at critics, including Senator Leila De Lima – jailed over drug charges she says were fabricated – and former Supreme Court Chief Justice Maria Lourdes Sereno who was ousted in May.

Opposition leaders have said these moves – along with attempts to discredit the country’s main rights agency – are part of Duterte’s scorched-earth tactics to silence critics and weaken democratic institutions.

Morales, who was appointed by Duterte’s predecessor, Benigno Aquino, in 2011 to head the anti-corruption watchdog, angered the president when she criticised his pronouncements on killings last year.

Their spat intensified last January when Morales defied Duterte’s order to suspend her deputy for allegedly leaking his bank records, saying the president’s directive violated the constitution.

Her agency was then investigating allegations that Duterte failed to disclose 211 million pesos (US$3.9 million) in secret bank accounts when he was a presidential candidate.