Glenn Greenwald has been charged with cybercrimes in Brazil after embarassing top Brazilian officials with his reporting.

Greenwald has published articles based on text messages that raise ethical and legal questions about powerful officials, including Brazil's justice minister.

The charges came as Brazil's president, Jair Bolsonaro, has faced criticism from watchdogs over his authoritarian behavior and attacks on press freedoms.

Visit Business Insider's homepage for more stories.

Glenn Greenwald, an American journalist famous for his central role in publishing the Edward Snowden leaks, has been charged for cybercrimes in Brazil, the New York Times reported on Tuesday.

Greenwald has been at the heart of a debate over press freedoms in Brazil under the increasingly authoritarian government of Brazilian President Jair Bolsonaro.

The US reporter, who has lived in Brazil for years and is married to a Brazilian congressman, in recent months has embarrassed powerful officials in Brazil by publishing articles based on leaked text messages. The Intercept Brasil, which Greenwald co-founded, began publishing articles on the text messages last summer.

In July, the Committee to Protect Journalists (CPJ) condemned Bolsonaro, who has a friendly relationship with US President Donald Trump, for suggesting Greenwald could "do jail time" over the reporting.

"The latest statements from President Bolsonaro threatening Glenn Greenwald with jail time are an inappropriate and dangerous escalation of the Brazilian government's troubling response to The Intercept Brasil's reporting," CPJ Central and South America Program Coordinator Natalie Southwick said at the time. She added: "Brazilian authorities must respect journalists' constitutional right to do investigative reporting and hold power to account."

Brazilian prosecutors on Tuesday filed a criminal complaint that accused Greenwald of being part of a "criminal organization" in relation to the hacking of cellphones belonging to prosecutors and other officials, per the Times. Greenwald has said he received the text messages from an anonymous source last year, but the complaint alleges he went further than this and played a "clear role in facilitating the commission of a crime."

Among others, the text messages raised ethical and legal questions on Brazil's justice minister, Sergio Moro, in terms of his conduct as a federal judge during the corruption trial that jailed former President Luiz Inacio Lula da Silva.

In a statement provided to Gizmodo on Tuesday, Greenwald said: "This denunciation — brought by the same prosecutor who just tried and failed to criminally prosecute the head of the Brazilian Bar Association for criticizing Minister Moro — is an obvious attempt to attack a free press in retaliation for the revelations we reported about Minister Moro and the Bolsonaro government."

"It is also on an attack on the Brazilian Supreme Court, which ruled in July that I am entitled to have my press freedom protected in response to other retaliatory attacks from Judge Moro, and even an attack on the findings of the Federal Police, which concluded explicitly after a comprehensive investigation that I committed no crimes and solely acted as a journalist," Greenwald added.

Greenwald said he will not be "intimidated by these tyrannical attempts to silence journalists."