LONDON (AP) — Britain's new domestic spy chief warned Tuesday that leaks exposing how the government keeps secrets will play into the hands of terrorists and curtail powers to fight terrorism —an allusion to the mass data collection program exposed by U.S. National Security Agency leaker Edward Snowden.

Citing the deadly mall attack in Kenya and the ongoing Syrian conflict, MI5's Director General Andrew Parker also said terrorism had become more diffuse and more unpredictable. He said terrorists were also turning to technological advancements such as encryption to hide their tracks.

"Threats are diversifying, but not diminishing," Parker told the Royal United Services Institute in his first public speech. "The Internet, technology and big data are transforming our society. ... We can't stop every plot, much as we try and much as we would like to. There are choices ahead that will determine whether we can sustain what we do, or accept that it will erode."

Debate on balancing security and people's individual privacy has been percolating since Snowden detailed the extent to which the NSA collects data on its citizens and shares some of that data with partner nations around the world.

Three groups filed a recent lawsuit at the European Court of Human Rights, accusing Britain's eavesdropping agency of using its online surveillance programs to violate people's privacy.

English PEN, Big Brother Watch and the Open Rights Group claim that Britain's Government Communications Headquarters, known as GCHQ, acted illegally by collecting vast amounts of data, including the contents of emails and social media messages.

Britain's domestic security agency of MI5 and its foreign spy service of MI6 rely heavily on tips and backup from GCHQ.

"Shifts in technology can erode our capabilities," he said. "There are choices to be made, including for example, about how and whether communications data is retained. It is not, however, an option to disregard such shifts with an unspoken assumption that somehow security will anyway be sustained. It will not. We cannot work without tools."

Suicide bombers attacked Britain in 2005, killing 52 London commuters. Since then, British nationals have been linked to several international terror plots, including the trans-Atlantic bomb plot when men planned to down some 10 jets using liquid explosives inside drink bottles.

Several thousand Islamist extremists are known in the UK "who see the British people as a legitimate target," Parker said.

Many of those have been energized by the Syria conflict and some 100 or so have traveled to Syria to participate — some of whom may pose a threat in the future to the UK, Parker said.

Parker, who has been with MI5 for some 30 years, was appointed in April.