The United Kingdom is among a group of several dozen countries taking steps to prevent repressive regimes from obtaining surveillance software they can use to spy on human rights workers and political dissidents. But that apparently hasn't stopped the UK's own spy agency, GCHQ, from spying on one of the top human rights organizations in the world.

Amnesty International recently learned that the spy agency had intercepted, stored and accessed its communications during an unspecified period, according to an email the human rights group received.

The email, from the UK’s Investigatory Powers Tribunal, revealed that the group had been one of two NGO's targeted by the GCHQ. The other was the Legal Resources Centre in South Africa.

The revelation comes after Amnesty International and nine other organizations filed a legal challenge against the GCHQ under suspicion that they had been spied upon.

“After 18 months of litigation and all the denials and subterfuge that entailed, we now have confirmation that we were in fact subjected to UK government mass surveillance. It’s outrageous that what has been often presented as being the domain of despotic rulers has been occurring on British soil, by the British government,” Salil Shetty, Amnesty International’s secretary general, said in a statement."How can we be expected to carry out our crucial work around the world if human rights defenders and victims of abuses can now credibly believe their confidential correspondence with us is likely to end up in the hands of governments?"

The email didn't indicate why Amnesty International was the target of spying or when the surveillance occurred, therefore it remains unclear if the entire organization was targeted or specific individuals working for it.

The email also didn't indicate what the GCHQ did with the collected data or if it shared the communications with anyone else. The UK is part of the Five Eyes spying partnership—which includes the US, Canada, Australia and New Zealand.

The revelation is ironic since the UK is one of 41 countries who are party to the Wassenaar Arrangement, an arms control pact aimed at controlling the spread of certain types of weapons. The countries recently added certain type of software surveillance tools to their list of items to be controlled in an effort to prevent repressive regimes from obtaining surveillance tools they can use against human rights workers and political dissidents.