A Brazilian Supreme Court justice on Wednesday blocked President Jair Bolsonaro’s pick to run the federal police, after an opposition party argued that the appointment of a family friend would allow Bolsonaro inappropriate influence over law enforcement.

The decision by Justice Alexandre de Moraes came after the top court authorised an investigation into allegations by Bolsonaro’s former justice minister that the president had abused his power by swapping the police chief.

Bolsonaro’s appointee, Alexandre Ramagem, and the presidential press office did not immediately respond to requests for comment.

Moraes wrote that he granted the injunction, which can still be appealed, because there were relevant signs that Ramagem, who was set to take office on Wednesday afternoon, could be compromised by his close relationship with Bolsonaro’s family.

Ramagem, who joined the federal police in 2005 and has run Brazil’s intelligence agency since July, has the fewest years of service of any officer tapped to lead the force.

He took charge of Bolsonaro’s security in 2018 after a stabbing on the campaign trail and grew close to the president’s sons, who have been accused of taking part in embezzlement and disinformation schemes, which they deny.

Bolsonaro’s shakeup of the federal police has spurred a political crisis in Brazil distracting from the battle against an accelerating coronavirus outbreak in the country, where the official death toll climbed past 5,000 on Tuesday, surpassing the death toll in China.