The former head of MI6, Sir John Sawers, has called for a new surveillance compact between internet companies and the security services in the UK and US in the wake of the Snowden revelations.

In his first speech since standing down as “C” at the end of last year, Sawers said the two could work together as they had in the past to prevent a repeat of events such as the Charlie Hebdo attack, the always present threats from militant Islamists in places such as Yemen, and the advance of Boko Haram in Nigeria.

In other parts of the speech, he aligned himself with Pope Francis in calling for restraint in offending the religious sensitivities of others after the Paris attack. He also, surprisingly, distanced MI6 from the CIA over what he called “lethal” operations.

Sawers, who is going into the private sector after decades in the Foreign Office and latterly at MI6, said the Snowden revelations in 2013 had shattered the previous informal relationship between tech companies and the surveillance agencies.

Companies such as Google and Microsoft had suffered a consumer backlash as a result of the revelations and are increasingly unwilling to cooperate to the same degree, creating a headache for the surveillance agencies in the US and the UK.

“Snowden threw a massive rock in the pool. The ripples from that have still not died down,” Sawers said. “It was certainly a great concern for me that the, if you like, informal co-operation that worked well between most technology companies and communication companies and security services was broken by the Snowden revelations and has not been repaired.”

A new compact had to be established in order to prevent terrorist attacks, such as the one in Paris, occurring more regularly. “We can’t afford to see that happen,” he said.

The intelligence services in the UK and the US are pushing the big internet companies to provide access to encrypted emails and chat. Sawers echoed recent calls by David Cameron and the head of MI5, Andrew Parker, for increased powers, and echoed Parker too in saying that a terrorist attack in London was not a matter of if, but when.

“The security community has done a fantastic job keeping these threats at bay … but if I was to sit here and say: ‘Will the goalkeepers of the security services and police keep every single attempt to get the ball into the net out?’ No. At some point a threat will get through.”

Sawers was speaking at the launch of a survey of international attitudes on trust at the headquarters of the PR firm Edelman in London. He devoted much of his speech to the issue of surveillance and said that, before the Snowden leaks, the public had been unaware of the extent of surveillance.

His response to the revelations sounded more measured than remarks he made to a parliamentary committee in November 2013 when he said the UK’s adversaries would be “rubbing their hands with glee”.

In his speech, he said: “When I look back on the Snowden episode, he gained some traction because the public did not know that GCHQ and the National Security Agency in the US could monitor traffic on the internet in the way they could.”

But there were benefits from the debate that had ensued over the last year and a half, he said.

“Of course, there is a dilemma here because the general public and politicians and the technology companies, to some extent, they want us to be able to monitor the activities of terrorists and other evildoers but they do not want their own activities to be open to any such monitoring.

“I think one benefit of the last 18 months’ debate is that people now understand that is simply not possible and there has to be some form of ability to cover communications that are made through modern technology.

“The prime minister must have been right when he was saying last week that you cannot afford to have a complete no-go areas, we cannot have no-go areas in our communities where the police cannot go, because that just allows space for the evil-doers to ply their trades.

“It is the same in the virtual world. If you allow areas which are completely impenetrable, then, OK, you might feel comfortable that your communications are private and no one else can see them, but so are those who are trying to do you down and undermine your society.”

Addressing the Paris attack Sawers said the west needed to exercise some restraint. “I rather agree with the pope that, of course, the attacks in Paris are completely unacceptable and cannot be justified on any basis whatsoever, but I think other people’s religion is also an important part of this. If you show disrespect for others’ core values, then you are going to provoke an angry response.”

He insisted that, in spite of the controversy involving the US over torture and rendition, MI6 had operated within the law rather than engaged in anything violent or thuggish.

Asked about how MI6 is seen around the world compared with US agencies, Sawers said: “I think in the UK we have stayed in the lane of our professional responsibilities. I think one of the problems for the CIA has been that it has become involved in lethal operations and that has muddied some of the work of the intelligence agencies.”

Renate Samson, chief executive of the campaign group Big Brother Watch, said: “The intelligence agencies already have a broad range of capabilities, including the ability to monitor specific individuals. We are told that attacks are regularly prevented using these resources. Before more powers are given we must be sure that these existing resources continue to be used efficiently and correctly. We do not want to see the intelligence mistakes that happened in Woolwich for example, happen again.

“To insist that it is simply not possible to conduct effective surveillance of suspects without having to observe the communications of the entire population is a worrying sign. It appears that the innocence of most citizens must come second to the guilt of the few.”