UK intelligence agencies can access raw data in bulk from the NSA and other foreign agencies without the use of a warrant, and keep the information on a database for two years, human rights organizations revealed today.

GCHQ, the British intelligence and security body, was forced to reveal the previously unknown "arrangements" — as they known by the government — at a secret hearing of the Investigatory Powers Tribunal, the UK's surveillance watchdog.

The documents were released in response to a challenge to GCHQ's practices brought by human rights groups Privacy International, Liberty, and Amnesty International in the wake of leaks by US whistleblower Edward Snowden in 2013.

They reveal that intelligence agencies can access raw information collected from US cables or through US corporate partnerships if it was "not technically feasible" to obtain the communications using a warrant and if it is "necessary and proportionate" for the intelligence agencies to obtain that data.

The rules allow for this bulk collection of data provided the request does not act as a "deliberate circumvention" of the legal safeguards on surveillance spelled out in the Regulation of Investigatory Powers Act (Ripa), first passed in 2000.

In July 2013 the Intelligence Services Committee conducted an investigation of GCHQ's access to the NSA's PRISM program, clearing GCHQ from "circumventing" UK law in any way because it held unpublished policies and procedures which ensured that its role in the intelligence-sharing program with the Americans complied with the Human Rights Act.

In the July report the committee said "in each case where GCHQ sought information from the US, a warrant for interception, signed by a Minister, was already in place, in accordance with the legal safeguards contained in the Regulation of Investigatory Powers Act 2000."

However, campaigners say this assurance is contradicted by the newly disclosed "arrangements," which state that a Ripa interception warrant "is not as a matter of law required in all cases in which unanalyzed intercepted communications might be sought from a foreign government."

The "arrangements" described in the new documents would allow Britain's intelligence agencies to trawl through foreign intelligence material without restrictions and retain both content and metadata for up to two years.

Eric King, deputy director of Privacy International, said that the "arrangements" call into question the legal safeguards protecting UK citizens from mass surveillance.

In Liberty's press release, King said: "We now know that data from any call, internet search, or website you visited over the past two years could be stored in GCHQ's database and analyzed at will, all without a warrant to collect it in the first place.

"It is outrageous that the government thinks mass surveillance, justified by secret 'arrangements' that allow for vast and unrestrained receipt and analysis of foreign intelligence material is lawful. This is completely unacceptable, and makes clear how little transparency and accountability exists within the British intelligence community."

Michael Bochenek, director of Law and Policy at Amnesty International, echoed King's concerns adding that a comprehensive set of rules governing information sharing should be established.

Bochenek said: "It is time the Government comes clean on such crucial issues for people's privacy as the sharing of communications intercepts with foreign governments. Secret rules are woefully inadequate. Nothing short of a sufficiently detailed set of rules and effective safeguards in publicly accessible legislation can redress the major deficiencies in the Government's handling of communications surveillance."

Follow Ben Bryant on Twitter: __@benbryant