The European Court of Human Rights has ruled that Britain's programme of mass surveillance, revealed by whistleblower Edward Snowden as part of his sensational leaks on US spying, violated people's right to privacy.

The court did not question the existence of the spying programme in itself, but said a lack of oversight and safeguards meant it undermined rights to privacy and free expression.

The court gave Britain, which is in the process of altering legislation on an issue publicly exposed by Mr Snowden, three months to decide whether to request an appeal hearing after the ruling.

"While the Court was satisfied that the intelligence services of the United Kingdom take their (European human rights) Convention obligations seriously and are not abusing their powers, it found that there was inadequate independent oversight of the selection and search processes involved in the operation," the court said in a statement.

The violations concerned in particular shortcomings when it came to selecting the Internet service providers involved, as well as the search criteria used to filter and select intercepted communications for assessment.

"Furthermore, there were no real safeguards applicable to the selection of related communications data for examination, even though this data could reveal a great deal about a person's habits and contacts," the court statement said.

By related communications, the court said it meant the collection of details like who calls who, from where and when - rather than the content of the communications.

The cases are the latest legal challenge to the UK in along-running spy scandal following revelations by Mr Snowden, a former US National Security Agency (NSA) contractor whose revelations in 2013 renewed debate over privacy versus security.

Among the more than one dozen groups that took the case to Strasbourg were the London-based Big Brother Watch organisation, the Bureau of Investigative Journalism and former Guardian reporter Alice Ross.

They said Britain's activities - many of them run from GCHQ (Government Communications Headquarters), a vast intelligence gathering centre in Cheltenham - could threaten the privacy of journalists, who may fear their contact lists or the websites they visit are being scrutinised by the government.

"Such data enables intrusion into the most intimate aspects of a person's daily life," Dinah Rose, one of the applicants' lawyers, told the court in hearings last year.

The British government's counsel, James Eadie, said at that time the programmes were necessary in the fight against terrorism.