The Court found that the UK's wide and secretive surveillance laws are "not in accordance with the law" and that they violate the right to privacy guaranteed by the European Convention on Human Rights.
Civil liberties groups Liberty and the Irish Council for Civil Liberties took the UK Government to the Court over allegations that their communications had been intercepted between 1990 and 1997.
The groups said that interceptions of legally privileged and confidential information took place, and that they had complained unsuccessfully to UK courts, the Interception of Communications Tribunal, the Director of Public Prosecutions and the Investigatory Powers Tribunal.
The case centred on the 1985 Interception of Communications Act, which has since been superseded by the Regulation of Investigatory Powers Act (RIPA).
"Section 3(2) of the 1985 Act allowed the British authorities extremely broad discretion to intercept communications between the United Kingdom and an external receiver," said a Court statement explaining the decision.
"Indeed, that discretion was virtually unlimited. Warrants under section 3(2) of the 1985 Act covered very broad classes of communications. In their observations to the Court, the British Government accepted that, in principle, any person who sent or received any form of telecommunication outside the British Islands during the period in question could have had their communication intercepted under a section 3(2) warrant," it said.
The Court recognised that the regulation of surveillance had to have an element of secrecy about it, but said that the UK did not offer UK citizens enough information about how much surveillance was taking place.
"Although during the relevant period there had been internal regulations, manuals and instructions to provide for procedures to protect against abuse of power, and although the Commissioner appointed under the 1985 Act to oversee its workings had reported each year that the 'arrangements' were satisfactory, the nature of those 'arrangements' had not been contained in legislation or otherwise made available to the public," it said.
"The Court considered that the domestic law at the relevant time had not indicated with sufficient clarity, so as to provide adequate protection against abuse of power, the scope or manner of exercise of the very wide discretion conferred on the State to intercept and examine external communications. In particular, it had not set out in a form accessible to the public any indication of the procedure to be followed for examining, sharing, storing and destroying intercepted material," said the Court.
"The interference with the applicants’ rights had not therefore been 'in accordance with the law', in violation of Article 8," of the Convention on Human Rights, it said.
"While secret surveillance is a valuable tool, the mechanisms for intercepting our telephone calls and emails should be as open and accountable as possible, and should ensure proportionate use of very wide powers," said Alex Gask, Liberty’s legal officer.
“The Court has found that the United Kingdom’s relatively sophisticated rules on data interception have failed to prevent unlawful interference with privacy rights. This has clear implications for many other Council of Europe member states, including Ireland," said Mark Kelly, director of the Irish Council for Civil Liberties.