The US National Security Agency's spy program targeted the communications of the Brazilian and Mexican presidents, and in the case of Mexico's leader accessed the content of emails before he was elected, the journalist who obtained secret documents from NSA leaker Edward Snowden has said.

Journalist Glenn Greenwald, who lives in Rio de Janeiro, told Globo's news program "Fantastico'' that a document dated June 2012 shows that Mexican President Enrique Pena Nieto's emails were being read. The document is dated a month before Pena Nieto was elected.

If the facts of the report are confirmed, they would be considered very serious and would constitute a clear violation of Brazil's sovereignty. Brazilian Justice Minister Eduardo Cardoza.

The document Greenwald based the report on includes communications from Pena Nieto indicating who he would like to name to some Cabinet posts among other information. It's not clear if the spying continues.

In the case of Brazil's leader, the June 2012 document "doesn't include any of Dilma's specific intercepted messages, the way it does for Nieto,'' Greenwald told The Associated Press news agency in an email.

"But it is clear in several ways that her communications were intercepted, including the use of DNI Presenter, which is a program used by NSA to open and read emails and online chats.''

Calls to Rousseff's office and a spokeswoman were not answered. Messages sent to a spokesman for Nena Pieto weren't immediately returned.

Brazilian Justice Minister Eduardo Cardozo told the newspaper O Globo that "if the facts of the report are confirmed, they would be considered very serious and would constitute a clear violation of Brazil's sovereignty.''

"This is completely outside the standard of confidence expected of a strategic partnership, as the U.S. and Brazil have,'' he added.

In July, Greenwald co-wrote articles in O Globo that said documents leaked by Snowden indicate Brazil was the largest target in Latin America for the NSA program, which collected data on billions of emails and calls flowing

through Brazil.

The Brazilian government denounced the NSA activities outlined in the earlier reports.

Greenwald began writing stories based on material leaked by Snowden in May, mostly for the Guardian newspaper in Britain.

Before news of the NSA program broke, the White House announced that Rousseff would be honored with a state dinner in October during a trip to the US, the only such full state dinner scheduled this year for a foreign

leader.