We thought we were living in the free world, until Edward Snowden began to reveal top secret documents about mass surveillance in 2013.
The first story based on those documents was published five years ago, showing how the US National Security Agency (NSA) amassed the data of 120 million phone calls between ordinary Americans.
Subsequent reportage, all based on material which Mr Snowden had taken from the NSA while working as a contractor, revealed a sprawling surveillance infrastructure – with the UK's signals intelligence agency, GCHQ, among its foremost players.
Five years on, Sky News is looking at how significant those documents were in proving that the government was spying on British citizens as well as foreigners.
Defence of GCHQ's surveillance activities stressed that they took place within the law and were not indiscriminate, merely gathering the whole haystack so intelligence analysts could go searching for needles – communications potentially connected to national security or serious crime threats.
Early documents suggested this attitude was not always repeated internally. One leaked document showed legal advisers at GCHQ making a note to the NSA that they had "a light oversight regime compared to the US" and considered the legal system in Britain a "selling point" for their partnership with the Americans, noting: "We are less constrained by NSA's concerns about compliance."
Subsequent court cases found that the legal framework in which the agency was operating was insufficient. That is to say the agency's conduct was completely within the law, but the law wasn't very good.
Legal challenges against the security and intelligence agencies go through a special court in the UK, the Investigatory Powers Tribunal. In 15 years, it had never found against the agencies. That was until February 2015, when it determined that a historical legal regime governing GCHQ's access to data intercepted by the NSA had itself been unlawful for seven years.
At the time, Eric King, then deputy director of civil liberties organisation Privacy International, said the decision "confirms to the public what many have said all along – over the past decade, GCHQ and the NSA have been engaged in an illegal mass surveillance sharing programme that has affected millions of people around the world".
GCHQ vociferously maintained that there is an important distinction to be made between its activities being illegal and the legal regime itself being insufficient.
The allegations of mass surveillance were broached by Sir Iain Lobban, director of GCHQ at the time of the Snowden leaks, to a parliamentary committee in November 2013.
"If you are a terrorist, a serious criminal, a proliferator, a foreign intelligence target, or if your activities pose a genuine threat to the national or economic security of the United Kingdom, there is a possibility that your communications will be monitored, as in we will seek to read, we will seek to listen to you," he said.
"If you are not, and if you are not in contact with one of those people, then you won't be. We are not entitled to. That is true actually whether you are British, if you are foreign, and wherever you are in the world."
It was also claimed that the NSA and GCHQ used each other to circumvent domestic laws about spying on British and American citizens, although an investigation by by MPs on the intelligence and security committee declared that this wasn't the case.
The committee stated: "It has been alleged that GCHQ circumvented UK law by using the NSA's PRISM programme to access the content of private communications. From the evidence we have seen, we have concluded that this is unfounded."
Despite the limited successes of the legal claims against the agency, the regulatory regime covering its surveillance activities was subsequently rewritten within the Investigatory Powers Act.
Many of the legal actions against GCHQ were undertaken by Privacy International.
The head of its programme challenging state surveillance, Edin Omanovic, told Sky News: "Edward Snowden's actions were good for the UK intelligence agencies, the UK government, and most importantly the British public.
"They brought long overdue attention to some of the most important and sensitive powers any government can have. As well as igniting a much needed debate about the extent to which people should be spied on, they highlighted a regulatory regime completely unfit for purpose – the independent reviewer of terrorism legislation called it 'undemocratic'. It was outright dangerous.
"The UK government and intelligence agencies consistently say that the resulting legal changes provide adequate safeguards and accountability against abuses. We disagree. But it follows that if the UK government believes they're now better regulated, then everyone's better for it."
The Investigatory Powers Act 2016 reshaped the legal regime for GCHQ, although the agency has stressed that it did not fundamentally change the rules they worked under, merely refreshed them.
Supporters of the agency have argued that new legislation had been in development for a long time before the Snowden disclosures, and that the positive steps that have appeared to have been taken following his disclosures were independent of them.
In a statement sent to Sky News, GCHQ's director Jeremy Fleming said: "GCHQ's mission is to help keep the UK safe. What Edward Snowden did five years ago was illegal and compromised our ability to do that, causing real and unnecessary damage to the security of the UK and our allies.
"He should be accountable for that. It's important that we continue to be as open as we can be, and I am committed to the journey we began over a decade ago to greater transparency."
Jim Killock, the executive director at Open Rights Group, told Sky News: "The legal changes and admissions could have taken years to happen. Most likely leaks and suspicions would have led to something sometime, but if the internet is teaching us anything it is that keeping secrets is hard for everyone, especially when you are doing something very bad."
Mr Omanovic added: "Secrecy around intelligence agencies' activities seems inevitable, but the journalism that has resulted from Snowden's documents contained information that should never have been kept from the public or politicians.
"For example, the documents revealed GCHQ hacking powers, allowing a case to be heard during which they were avowed and eventually leading to their regulation.
More from Edward Snowden
"While you could drive a bus through the protections in the resulting powers, their inclusion within an explicit statutory framework is preferable to the government continuing to exercise them in secret."
An accompanying analysis, on how significantly the publication of secret documents damaged the security services' ability to keep the UK safe, is available here.