LONDON — After four home-grown suicide bombers killed 52 London commuters on July 7, 2005, Prime Minister Tony Blair vowed that Britain would stop at nothing to defeat terrorism. "Let no one be in any doubt," he said. "The rules of the game are changing."
Since the Sept. 11 attacks in the United States four years earlier, Britain had made its anti-terrorism powers among the toughest in the Western world. Now they became tougher still.
"What 7/7 did was it made people realize that the threat was internal as well as external," said David Anderson, Britain's official reviewer of terrorism legislation.
After 2005, police were given power to hold terrorism suspects for four weeks without charge, or to place them under a 16-hour-a-day curfew. It became a crime not just to commit or plan for terrorism but to glorify terrorist acts. The government moved to deport extremist preachers who had made their home in Britain. The ability of intelligence agencies to scoop up Internet users' electronic data expanded vastly, and British spies began collecting information on their own citizens on a hitherto unseen scale.
Civil libertarians sensed the spread of a Big Brother state, and waged legal and political battles that managed to water down or reverse some of the measures. But a decade later, Britons are more watched than ever. Last month's gun attack on tourists in Tunisia, which killed 30 Britons, shows the terrorist threat has not gone away, and could spur a new round of counter-terror measures.
"That's always the fear, of knee-jerk reactions, the need to be seen to be doing something even if what you are doing is reputationally damaging," said Rachel Robinson, a policy officer at human rights group Liberty. "That's what we've seen time and time again."
The July 2005 bombings on three subway trains and a bus — the deadliest attack on British soil since World War II — were carried out by young Britons inspired by al-Qaida.
In a bid to stop more plots, Blair's government expanded the definition of a terrorist offense and introduced new powers to detain terror suspects.
The 2006 Terrorism Act allowed terror suspects to be held for 28 days without charge. Blair had argued that the complexity of terror plots meant the limit should be 90 days, but lawmakers defeated him. They also rejected a bid two years later for 42-day detention.
Suspects who could not be charged — often because the evidence against them was secret — could be held under control orders, a form of house arrest that meant they could be electronically tagged, kept under curfew for up to 16 hours per day and barred from using telephones or the Internet.
Rights groups loudly opposed the measures, and when a Conservative-Liberal Democrat coalition took power in 2010, it said the previous Labour administrations had "abused and eroded fundamental human freedoms."
Under the coalition, pre-charge detention was cut to 14 days. Control orders gave way to a less-restrictive replacement. Government curbed the power of police officers to stop and search people without suspicion.
But one aspect of counterterrorism just kept expanding — surveillance, both in the streets and online.
In 2005, Britain already had as many as 4 million surveillance cameras, whose use as a crime-fighting tool had been encouraged by authorities since the 1990s. Tony Porter, Britain's surveillance camera commissioner, says the number today could be 6 million.
"The overwhelming view from our European colleagues is that the U.K. is the European — if not the world — capital of surveillance," said Porter, a former counterterrorism police officer charged with ensuring responsible use of the country's publicly operated cameras.
Porter says the cameras have broad public support. But he worries the public is ill-informed about "the size, scope and scale" of the camera network, and how fast the technology is changing. Police are currently testing facial-recognition software that can identify suspects through family resemblances.
"Part of my role has been to work with police forces, local communities ... just to start that debate, so we don't latently accept surveillance without truly understanding what it does," Porter said. "We need to have a society where surveillance cameras are there to support communities, not spy on them."
Unlike visible security cameras, online surveillance was largely hidden from the public until former National Security Agency contractor Edward Snowden leaked details about the activities of American spies and their allies.
British politicians and spies have been at the forefront of electronic data-gathering. In the months after the 7/7 attacks, Britain helped pass a European Union directive requiring telecoms companies to retain data for up to two years. Last year, it was struck down by the European Court of Justice.
The British government attempted to introduce the Communications Data Bill — dubbed the Snoopers' Charter by opponents — to force British telecommunications providers to retain for a year records of all phone and email traffic and website visits. It was eventually shelved amid opposition from Liberal Democrat lawmakers.
Court rulings have also curbed some British surveillance activities. But public debate about the civil liberties implications of snooping has been more muted here than in the U.S. or some other European countries.
Anderson said in Britain, "there is a relatively high degree of trust in the state and in its intelligence agencies," and the word spies often evokes benign images of James Bond or Bletchley Park code-breakers.
There have been fewer leaks to expose the covert activities of Britain's MI5 and MI6 than there have been about the CIA — though whether that is the result of luck, deference or genuine high standards is debatable.
Britons also know that the threat of terrorism is real, and there is evidence to suggest cyber-spying works. In a report released last month, Anderson said spies' use of bulk communications data helped foil plots including an al-Qaida plan to have sleeper cells launch waves of attacks in several European countries.
The attack in Tunisia has brought more promises of swift action. Prime Minister David Cameron vowed to "step up our own efforts to support our agencies in tracking vital online communications." His Conservative government, elected in May, plans to introduce a new, more limited, version of the Communications Data Bill.
Cameron has also introduced a law requiring schools and other public institutions to identify and tackle signs of radicalization — a step opponents claim seeks to turn teachers into spies.
Anderson thinks some of the measures brought in since 7/7 have been effective, and some have been excessive.
His report said "a comprehensive and comprehensible new law should be drafted from scratch ... providing for clear limits and safeguards on any intrusive power that it may be necessary for public authorities to use."
He recommended a judge, rather than a government minister, should sign off on requests to intercept data — already the procedure in the U.S. and many other countries.
Anderson describes the last decade as "five years getting tougher, five years cautious liberalization and I think now we're at a crossroads."
"It remains to be seen what this government does," he said.
Follow Jill Lawless on Twitter at http://Twitter.com/JillLawless