RIO DE JANEIRO — National Security Agency leaker Edward Snowden wrote in a lengthy “open letter to the people of Brazil” that he’s been inspired by the global debate ignited by his release of thousands of National Security Agency documents, and that the NSA’s culture of indiscriminate global espionage “is collapsing.”

In the letter, obtained on Tuesday by The Associated Press, Snowden commended the Brazilian government for its strong stand against US spying.

He said he’d be willing to help the South American nation investigate NSA spying on its soil, but could not fully participate in doing so without being granted political asylum, because the US “government will continue to interfere with my ability to speak.”

Revelations about the NSA’s spy programs were first published in June, based on some of the thousands of documents Snowden handed over to the Brazil-based American journalist Glenn Greenwald and his reporting partner Laura Poitras, a US filmmaker.

The documents revealed that Brazil is the top NSA target in Latin America, spying that has included the monitoring of Brazilian President Dilma Rousseff’s cellphone and hacking into the internal network of state-run oil company Petrobras.

The revelations enraged Rousseff, who in October canceled an official visit to Washington that was to include a state dinner. She’s also pushing the United Nations to give citizens more protections against spying.

In his letter, Snowden dismissed US explanations to the Brazilian government and others that the bulk metadata gathered on billions of emails and calls was more “data collection” than surveillance.

“There is a huge difference between legal programs, legitimate spying … and these programs of dragnet mass surveillance that put entire populations under an all-seeing eye and save copies forever,” he wrote. “These programs were never about terrorism: they’re about economic spying, social control, and diplomatic manipulation. They’re about power.”

Brazilian senators have asked for Snowden’s help during hearings about the NSA’s targeting of Brazil, an important transit hub for trans-Atlantic fiber optic cables that are hacked. Both Greenwald and his domestic partner David Miranda spoke before the senate, and Miranda has taken up the cause of persuading the Brazilian government to grant political asylum to Snowden.

Snowden, who is living in Russia on a temporary one-year visa, previously requested political asylum in Brazil and several other nations.

On Tuesday, neither Brazil’s Foreign Ministry nor the presidential office said they had immediate comment on Snowden’s letter or any pending asylum request.

Several members of Brazil’s congress have called for Snowden to receive asylum, so that he could assist lawmakers’ investigation into NSA activity in Brazil.

Rousseff recently joined Germany in pushing for the United Nations to adopt a symbolic resolution which seeks to extend personal privacy rights to all people.

The Brazilian leader has also ordered her government to take several measures, including laying fiber optic lines directly to Europe and South American nations, in an effort to “divorce” Brazil from the US-centric backbone of the Internet that experts say has facilitated NSA spying.

Snowden was letter was first published Tuesday in a Portuguese translation by the Folha de S. Paulo newspaper. The AP later obtained the original English version.