The UK's bulk interception powers, exposed by the whistleblower Edward Snowden, have been found to be illegal by the European Court of Human Rights. In a landmark judgement, the court ruled agencies had violated rights as there were no proper safeguards.
The court crucially said bulk interception was legitimate and it had seen no evidence it had been abused. Parliament reformed surveillance powers in 2016 and introduced a new watchdog. Critics say the system is still flawed.
In 2013, Edward Snowden revealed that GCHQ - the UK's eavesdropping agency - had been secretly collecting communications sent over the internet on an industrial scale.
It could reassemble the communications, filter them and then analyse the remainder for anything useful to protecting national security.