EE, O2, Vodafone and Three demand answers on how spies can allegedly get around UK laws using NSA's Dishfire program

All four British mobile phone networks are to ask the government to explain how spy agencies have been able to tap into a secret US database to trawl through the text messages of UK citizens without their knowledge.

In the first sign of a push back by the British telecoms industry against the mass surveillance of their customers, as exposed by the National Security Agency whistleblower Edward Snowden, BT's chief executive also waded into the debate, describing the laws on data collection as not fit for purpose.

Three, which has nearly 8 million customers, on Wednesday joined Vodafone, O2 and EE in demanding answers from the government on how spies are apparently able to get around UK laws by using the Dishfire database operated by the NSA, which has collected almost 200m text messages a day from across the globe.

A spokesman for Three said: "We take our customers' privacy seriously. We are seeking clarity from the authorities following the reports of Dishfire activity."

Mobile phone operators are required by law to hand over customer data on a case-by-case basis where specific individuals are being targeted, but Dishfire is understood to have collected information on citizens indiscriminately, sharing data on customer location, border crossings, banking details and travel plans.

Documents dating from 2011 reveal how UK spy agency GCHQ has made use of the NSA database to search "untargeted and unwarranted" communications involving British mobile phone customers.

In a statement, the second largest network, O2, which has 23 million subscribers, told the Guardian it would raise the issue with GCHQ. It said: "We are in the process of writing to the GCHQ to understand these allegations further. Once we hear back we'll be in a better position to understand our next steps."

EE, Britain's largest mobile network, said on Tuesday it would raise the matter with government representatives. A spokesman said: "We were not aware of Dishfire and have asked the relevant authorities for some clarification."

Vodafone last week became the first British telecoms firm to speak out, saying it would not go beyond what was required by the law in meeting government surveillance requests. The network's Stephen Deadman told Channel 4 News last week that he was shocked and surprised after learning of the Dishfire operation.

"We are going to be contacting the government and we are going to be challenging them on this. From our perspective the law is there to protect our customers and it doesn't sound as if that is necessarily what is happening. For British companies protecting the privacy of British customers is absolutely imperative and we expect the government to step up and take some control."

Vodafone has gone further than any other UK telecoms company in saying that it is keen to follow American networks AT&T and Verizon by publishing statistics about the number of surveillance requests it receives from governments around the world each year, and has asked for a meeting with the home secretary, Theresa May, to clarify its legal right to do so.

BT's chief executive, Gavin Patterson, spoke on Wednesday at the World Economic Forum in Davos, describing the law that protects the data of private citizens as murky.

Patterson, who was sharing a platform with Yahoo's chief executive, Marissa Mayer, said: "It's just too murky at the moment, it needs to be transparent and needs … clear guidelines about what's acceptable and what isn't.

"The legislation has to catch up … It's not fit for purpose today. Everybody recognises the internet plays a role in protecting us and we've got to make sure it's not intrusive and also protects the rights to the individual. I don't think the legislation has managed to keep up."