Brasilia: Brazil's government has summoned the US ambassador and called a cabinet meeting over allegations that the National Security Agency directly spied on President Dilma Rousseff and her Mexican counterpart.

The claims reported by US journalist Glenn Greenwald, who obtained secret files from NSA leaker Edward Snowden, follow allegations of widespread US electronic espionage in Latin America that angered the region's leaders.

The report emerged as Ms Rousseff prepares to travel to Russia later this week for a Group of 20 summit during which she will come face to face with US President Barack Obama. She is also scheduled to visit Washington in October.

Mr Greenwald, who lives in Rio de Janeiro and writes for London's Guardian newspaper, told Globo television that the NSA tracked Ms Rousseff's use of the internet and accessed emails of Mexican President Enrique Pena Nieto before his election last year.