Powers used by the security services to "Hoover up" communications data from most people in the UK
Powers used by the security services to "Hoover up" communications data from most people in the UK, even those not suspected of an offence, are "too wide" and invade privacy, a court has heard.
Civil rights group Liberty is challenging the government at the High Court over how the Investigatory Powers Act (IPA) - dubbed the "snoopers' charter" by critics - is being used.
It says it is incompatible with the European Convention on Human Rights.
The government denies the claim.
Liberty's lawyers say that "bulk" data gathered by the security services and other agencies, under warrants granted by a judge or the home secretary, can include:
intimate data including an individual's internet browsing history
which apps they have downloaded to their phone
their usernames and passwords
and even cell site data that can pin-point a person's location at a given time
Even if a warrant has been granted for the data to be gathered, they argue, the searching of bulk data - sometimes known as secondary data - is not governed by any warrant.
They also say the data can still be searched even if the warrant, that allowed for it to be seized in the first place, has expired.
Liberty's barrister Martin Chamberlain QC told the court: "These powers permit the interception or obtaining, processing, retention and examination of the private information of very large numbers of people - in some cases, the whole population.
"They also permit serious invasions of journalistic and watchdog organisations' materials and lawyer-client communication."
Last week, in a preliminary hearing, it emerged that the storage and handling of large amounts of data gathered by the security service MI5 is "undoubtedly unlawful" according to the government watchdog - the investigatory powers commissioner.
Safeguards over the storage, retention and deletion of data were not being adhered to by the domestic security service the watchdog said in a ruling.
MI5's data use was 'unlawful', watchdog says
Snowden surveillance powers ruled unlawful
In court, the lawyers for Liberty maintained that the government's oversight of the operation of the IPA was inadequate in the way it failed to properly supervise the interception of communications data - who sent what to who and when - and the way in which that data can be subsequently searched.
The court action has been joined by the National Union of Journalists which says the current regime for data interception does not adequately safeguard journalists from interference from the state.