The outgoing leader of Britain's electronic eavesdropping agency has offered a vigorous defense of its work, insisting the organization had delivered security while protecting privacy to the greatest extent possible.

Iain Lobban, who is leaving GCHQ after six years, says that strong cyber capabilities were needed to disrupt threats because "those who would do us harm don't want to be found."

"We have to enter that labyrinth to find them," he told a hand-picked audience in London on Tuesday.

He stressed GCHQ's mission is "the protection of liberty, not the erosion of it."

Civil liberties advocates have criticized GCHQ and its American counterpart, the National Security Agency, amid revelations by Edward Snowden. The former NSA analyst disclosed that the American government collected digital and telephone records on a vast scale.