Brazil's government on Monday admitted that its top intelligence agency spied on diplomatic targets from countries including the U.S., Iran and Russia. Brazil's Institutional Security Cabinet, however, clarified that the spying operation conducted a decade ago, were relatively basic and "in absolute compliance" with the country's legislation.

Brazilian newspaper Folha de São Paulo reported on Monday that the country's main espionage branch Abin (Brazilian Intelligence Agency) spied on three foreign diplomats at embassies and in their homes. A report by the agency provides details on ten secret operations conducted between 2003 and 2004. Russia and Iran with whom, Brazil has sought to build closer relations were also targeted by Abin.

According to The New York Times, the revelation comes as a major embarrassment to the Brazilian government which has been highly critical of the U.S. NSA spying efforts. Following the leak of NSA's surveillance programme, Brazilian president Dilma Rousseff had cancelled a visit to the U.S. back in September. Along with Germany, Brazil had since taken the matter to the UN.

Brazil's President Dilma Rousseff participates in a session to honour the 25th anniversary of the promulgation of the Brazilian Federal Constitution at the National Congress in Brasilia October 9, 2013. (REUTERS/Ueslei Marcelino)

Atlantic Wire termed the Brazilian spying as "fairly anodyne compared to the revelations surrounding the NSA's surveillance procedures." Revealing further details and the basic nature of the surveillance procedure followed by Abin, Folha de São Paulo reports that Brazilian agents followed and photographed Russian diplomats involved in negotiations for military equipment sale.

Iranian embassy employees were followed by Abin agents to identify their contacts in Brazil. The report also says that Iraqi diplomats were followed on foot and by car to record their activities both at the embassy and at homes.

The country's intelligence officials said Abin's spying operations were aimed at defending "national sovereignty."

Following the report published in the Folha de São Paulo, officials said leaking of classified material was illegal. They said that those responsible for the leak will be held accountable under Brazilian law.