RIO DE JANEIRO — Federal prosecutors in Brazil on Tuesday charged the American journalist Glenn Greenwald with cybercrimes for his role in bringing to light cellphone messages that have embarrassed prosecutors and tarnished the image of an anti-corruption task force.
In a criminal complaint made public on Tuesday, prosecutors in the capital, Brasília, accused Mr. Greenwald of being part of a “criminal organization” that hacked into the cellphones of several prosecutors and other public officials last year.
Mr. Greenwald, an ardent critic of Brazil’s far right president, Jair Bolsonaro, is a deeply polarizing figure in Brazil, where his work is lionized by leftists and condemned as partisan and heavy handed by officials in the Bolsonaro administration.
The news organization Mr. Greenwald co-founded, The Intercept Brasil, published articles last year based on the leaked cellphone messages that raised questions about the integrity and the motives of key members of Brazil’s justice system.
The articles cast doubt on the impartiality of a former judge, Sérgio Moro, and of some of the prosecutors who worked on a corruption investigation that landed several powerful political and business figures in prison.
Among those charged in connection with the corruption investigation was a former president, Luiz Inácio Lula da Silva, a popular leftist whose conviction paved the way for the election of Mr. Bolsonaro. Mr. Moro was the judge who handled that case, and he is now Mr. Bolsonaro’s minister of justice.
The case raises concerns among journalists and advocates for a free press because journalists often rely on confidential or leaked information, sometimes obtained by whistle-blowers or hackers.
In fact, Mr. Greenwald has been part of a team that won some of the most important prizes in journalism — the George Polk Award and the Pulitzer Prize for public service — for his role in reporting on documents describing government surveillance that were passed on to him by Edward J. Snowden, a former contractor with the National Security Agency of the United States who later faced espionage charges in connection with the leak.
In a statement Mr. Greenwald called the charges “an obvious attempt to attack a free press in retaliation for the revelations we reported about Minister Moro and the Bolsonaro government.”
Mr. Greenwald, who has not been detained, said he intended to continue publishing and cast the case against him as a test of Brazil’s democracy.
“We will not be intimidated by these tyrannical attempts to silence journalists,” he said.
In a 95-page criminal complaint, prosecutors say that The Intercept Brasil, the news organization Mr. Greenwald co-founded, did more than merely receive the hacked messages and oversee the publication of newsworthy information.
Citing intercepted messages between Mr. Greenwald and the hackers, prosecutors say the journalist played a “clear role in facilitating the commission of a crime.”
For instance, prosecutors contend that Mr. Greenwald encouraged the hackers to delete archives that had already been shared with The Intercept Brasil, in order to cover their tracks.
Prosecutors also say that Mr. Greenwald was communicating with the hackers while they were actively monitoring private chats on Telegram, a messaging app. The complaint charged six other individuals, including four who were detained last year in connection with the cellphone hacking.
Legal experts and leftist politicians criticized the decision to charge Mr. Greenwald, calling the evidence outlined against him thin.
Thiago Bottino, a legal expert at Fundação Getúlio Vargas University in Rio de Janeiro, said prosecutors have not described evidence that suggests Mr. Greenwald broke the law.
“There’s nothing in the complaint showing that he helped or guided” the hackers, he said.
Mr. Bottino said Brazil’s case law gives journalists broad protections. “You can’t punish a journalist for divulging a document that was obtained through criminal means,” he said.
Gleisi Hoffman, the president of the Workers’ Party, the largest opposition party, called the charge an abuse of power.
“They want a police state, with more farces, illegalities and arbitrary acts,” she wrote in a message on Twitter.
Mr. Greenwald moved to Brazil in 2005 after meeting David Miranda, a Brazilian man he later married and who became a federal congressman last year.
Mr. Greenwald first became widely known for his role in the release of classified national security documents leaked by the former National Security Agency contractor Edward Snowden in 2013. He co-founded The Intercept Brasil in 2016.
Mr. Greenwald expressed concern last year that the authorities might charge him criminally as a reprisal for The Intercept Brasil’s reporting based on the leaked messages.
Mr. Bolsonaro left little doubt that he’d relish seeing the journalist punished. In late July, the president used a derisive term to refer to Mr. Greenwald and said the journalist “might wind up in jail.”
Mr. Greenwald’s concerns were partly based on reports that federal officials were investigating his finances.
Those reports led a Supreme Court justice, Gilmar Mendes, to issue an extraordinary order barring the federal police from investigating Mr. Greenwald’s role in the dissemination of the hacked messages.
Prosecutors on Tuesday said they abided by that order until they found audio messages which, they argued, implicated Mr. Greenwald in criminal activity.
The charges came as a “huge surprise,” Mr. Greenwald said in an interview on Tuesday, because the Federal Police issued a report in December that cleared him of having engaged in criminal conduct related to the phone hacks.
Mr. Greenwald said he had been methodical in his dealings with the source who gave him the leaked chats, mindful of the lessons he had learned in the Snowden case.
“The one thing I could not do is give direction,” Mr. Greenwald said. “That’s crossing a line. I was very careful.”
The prosecutor who filed the case, Wellington Oliveira, last month charged the president of Brazil’s bar association with libel for making disparaging remarks about Mr. Moro.
A federal judge recently dismissed the case, ruling that Mr. Oliveira’s argument lacked a solid legal base.
The Committee to Protect Journalists expressed alarm over the case against Mr. Greenwald.
“Charging journalists with criminal activity based on interactions with sources sends a chilling message to reporters working on sensitive stories at a time when the Brazilian media is increasingly under attack from officials in its own government,” said Natalie Southwick, the program coordinator at the committee who monitors press freedom in Latin America.
Manuela Andreoni contributed reporting from Rio de Janeiro, and Letícia Casado from Brasília.