Harper said Canadian officials are “reaching out very proactively” to their counterparts in Brazil.

Brazilian President Dilma Rousseff is accusing the Ottawa-based Communications Security Establishment Canada of mounting a sophisticated spy operation against her country’s Ministry of Mines and Energy.

“Obviously I’m very concerned about this story and about some of the reports around it, very concerned,” Harper said at a closing news conference following a summit of Asia-Pacific leaders.

The claim is based on documents leaked to Brazilian media by Edward Snowden, a former contractor with the National Security Agency — the American counterpart of Canada’s CSEC.

Canada has long complained about industrial and commercial espionage by countries such as China, which makes the revelations particularly embarrassing.

The Prime Minister’s Office initially dismissed the reports of the Brazilian spying by saying it never comments on matters of national security. However the claims relate specifically to economic espionage and cannot be so easily brushed aside.

Brazil’s Foreign Minister Luiz Alberto Figueiredo summoned the Canadian ambassador in the capital of Brasilia on Monday to “transmit the indignation of the Brazilian government and demand explanations,” said a statement from the Foreign Ministry.

The statement said Figueiredo expressed “the government’s repudiation of this serious and unacceptable violation of national sovereignty and the rights of people and companies.”

The CSEC, headquartered in Ottawa, monitors foreign computer, satellite, radio and telephone traffic for intelligence of interest to Canada.

But it has never been known as a hub of economic intelligence gathering.

Harper said he’ll be checking to see if the agency acted within the law.

“We do have a commissioner of the Canadian Security Establishment,” said the prime minister.

“That commissioner does surveillance and audits the organization to make sure its operating within Canadian law. As I say, we are concerned and we will do appropriate followup.”

The damaging allegations threaten to turn into a major diplomatic feud between the emerging South American economic powerhouse and Canada, which hopes to extend trade ties in the region.