my credibility and that of the government".

What's the allegation against Bolsonaro?

Mr Moro alleged that the president was meddling in federal police efforts to fight corruption.

He said Mr Bolsonaro had told him he was replacing Mr Valeixo to install someone with whom he had "personal contact, whom he could call, ask for information, intelligence reports".

"Providing this type of information is not the job of the federal police," he said.

Mr Moro also alleged Mr Bolsonaro had said one reason for ousting Mr Valeixo was that he was "worried" about some ongoing investigations.

Firing Mr Valeixo was also "a signal that the president wanted me out", he added.

Mr Moro is a popular figure in Brazil. He is a former judge who oversaw the country's biggest anti-corruption probe, which uncovered billions of dollarsof bribes and led to the convictions of dozens of high-profile business leaders and politicians.

The sound of pot-banging protests rang out in cities across Brazil after his resignation was announced.

How has Bolsonaro responded?

In a televised address, the far-right president called the claims against him "baseless" and said he could choose who he wanted as federal police chief.

image copyright AFP image caption Mr Bolsonaro denied the allegations, flanked by most of his cabinet

"The appointment is mine, the prerogative is mine and the day I have to submit to any of my subordinates I cease to be president of the republic," Mr Bolsonaro said flanked by most of his cabinet in the presidential palace in Brasília.

He also accused Mr Moro of demanding a nomination to the supreme court in return