Exclusive: Tony Blair's government allowed America to store and analyse the email, mobile phone and internet records of potentially millions of innocent Britons, Channel 4 News can reveal.

Please wait while this video loads. If it doesn't load after a few seconds you may need to have Adobe Flash installed.

In 1946, peace was less than a year old. Labour was in power and the wartime signals intelligence service had been renamed as GCHQ. Building on their wartime collaboration, Britain and America signed an agreement that was to prove crucial to the so-called "special relationship".

They agreed to share intelligence on foreign countries but not to spy on each other's citizens. Later that was extended to five English-speaking countries, and is known as the "five eyes" agreement.

Now, in a joint investigation with the Guardian, drawing on documents released by the whistleblower Edward Snowden, we can reveal exactly when and how that agreement was unpicked.

Innocent citizens

Between 2004 and 2007 the Labour government gave the US National Security Agency permission to use information on innocent British people collected in the process of spying on actual targets.

According to a top secret memo I have seen, from within the NSA and dated June 2007, Britain agreed the Americans could "unminimise" British landline numbers as early as 2004. That means they were not obliged to delete them, and could now use their systems to analyse them.

News

We approached Jack Straw, foreign secretary until 2006, and Margaret Beckett, who was in charge when the 2007 agreement was signed. We also approached the NSA and GCHQ. They declined to comment.

For transparency, we can reveal we have notified the DA notice committee of our intention to publish these documents.

Both US and UK officials have previously denied the signatories to the 1946 agreement spy on each other's citizens. But earlier Snowden revelations showed how, by targeting each other's citizens, Britain and the USA could get around legal strictures on targeting their own.

Then, in the dying days of the Blair administration, it allowed US spies to work with mobile, email, fax and internet data in the same way.

By 2004 the Americans had clear reasons to be concerned about UK citizens and terror. Shoe bomber Richard Reid was in a US jail; there were nine Brits in Guantanamo.

But a second document, a draft memo written by a senior officer in the NSA in 2005, shows the extent the Americans were prepared to go to in order to spy on British citizens without UK government agreement.

This memo contains separate paragraphs with distinct and different circulation lists. The paragraph the UK intelligence partners got to see says America is going to target British citizens "with the full knowledge and co-operation of GCHQ".

Proof

These two documents are the first proof in black and white that an agreement exists between Britain and the USA on the targeting of each other's citizens (on the assumption, not confirmed, that Britain gained the reciprocal right to use data collected on Americans in the 2007 agreement).

News

What does it all mean? Well many people have greeted the Snowden revelations with a shrug: "What’s the problem if you're doing nothing wrong?" has been the response to evidence of widespread surveillance outside the law.

These documents show that, as late as 2007, the British government did object to its citizens' data being scraped and analysed by US spies. And they show that in 2005 the USA was preparing to spy on Britain "unilaterally" and without its knowledge.

Something changed during the Blair government – but no account of it has been given in public by those who took the decisions, nor is it clear what the politicians knew.

Not for British eyes

But the paragraph above, marked "NOFORN" – meaning not even for British eyes – says the Americans are also prepared to spy on UK citizens "unilaterally" and if they did so the UK would not be told.

Together with the Guardian we approached both the US and British authorities to clarify what Britain got in return for the 2004 and 2007 agreements, and to ask what happened to the 2005 draft memo. They declined to comment.

Please wait while this video loads. If it doesn't load after a few seconds you may need to have Adobe Flash installed.