The campaign in Brazil against the investigative journalist Glenn Greenwald could hardly look more personal. The country’s far-right president, Jair Bolsonaro, suggested last year that the American “may do jail time”, and has used homophobic slurs against him. Mr Greenwald and his husband, the Brazilian congressman David Miranda, have faced not only lies and verbal attacks but death threats: “Neither my husband, nor I, nor our children, have left our house in the last year without armed security, armoured vehicles, teams of security,” he said this week.

Now Mr Greenwald, an outspoken critic of the president, has been charged with cybercrimes over the publication of leaked phone messages apparently showing collusion between prosecutors and Sérgio Moro, then a judge, but now justice minister. They fuelled concerns about the huge Car Wash anti-corruption investigation: while it uncovered shocking abuses, it also raised suspicions of political bias. Mr Moro oversaw the trial that led to the jailing of the popular former president Luiz Inácio Lula da Silva, whose conviction eased Mr Bolsonaro’s election.

The case against Mr Greenwald accuses him of “facilitating the commission of a crime”. The journalist says he was extremely careful not to take part in any crime, and neither federal police nor a supreme court justice found grounds to pursue him. Many are shocked by the prosecutor’s decision to charge Mr Greenwald nonetheless. But Mr Bolsonaro and his allies regularly demonstrate their contempt for institutions. What better way to spread the message that authorities can act with impunity, instilling fear – especially when the target is a high-profile US citizen?

Those voicing outrage include Edward Snowden and media freedom campaigners, but also those who have been at odds with Mr Greenwald in the past. Hearteningly, the conservative president of the lower house of congress in Brazil has denounced the decision and some supreme court judges have reportedly said they would reject the case. This is, of course, an attack on press freedom. But a free press is also a safeguard of Brazilian democracy itself. Mr Bolsonaro is not only racist, sexist and homophobic, but has defended dictatorship, praised the most notorious torturers of the military regime that ran Brazil from 1964 to 1985, and called for his political opponents to be shot.

Like other authoritarians he has been enabled by the US president; the men have expressed their mutual admiration. The Trump administration has attacked press freedom, not only through the president’s imprecations against “fake news” and inveighing against individual journalists, but also through the decision to prosecute Julian Assange on charges of publishing classified information through WikiLeaks: a clear assault on first-amendment rights. Populist rightwing authoritarians are thriving on their alliances. Defending Mr Greenwald is a matter of international, not just individual, importance.