Boris Johnson has issued a staunch defence of the Guardian's "salient and interesting" revelations showing the extent of mass surveillance by US and UK intelligence agencies.

The mayor of London told an audience at the World Islamic Economic Forum on Wednesday that it was important that governments and their spies were held to account by a "beady-eyed" media.

"I think the public deserves to know," said Johnson. "The world is better for government being kept under the beady-eyed scrutiny of the media and for salient and interesting facts about public espionage being brought into the public domain."

Johnson's intervention puts him at odds with David Cameron, who has said the leaks based on files from the whistleblower Edward Snowden have made the UK less safe. This week the prime minister issued a veiled threat to take "tougher measures" against the Guardian and other newspapers unless they showed a more socially responsible attitude.

"I don't want to have to use injunctions or D notices or the other tougher measures," Cameron said. "I think it's much better to appeal to newspapers' sense of social responsibility. But if they don't demonstrate some social responsibility it would be very difficult for government to stand back and not to act."

Johnson highlighted the news that the German chancellor Angela Merkel's phone had been bugged by the US National Security Agency for a decade, a story originally reported in the German news weekly Der Spiegel.

"I personally defend the Guardian's right to publish interesting information such as that Angela Merkel's phone was bugged by Barack Obama. I think that is an interesting fact," he said. "I don't believe that the fact that Angela Merkel's phone was bugged by the NSA does anything to jeopardise anybody's security, it's merely colossally embarrassing and it should come out."

On Thursday the House of Commons will debate the oversight of the UK's intelligence agencies. The Liberal Democrat MP Julian Huppert, who is leading the debate along with Labour's Tom Watson and the Tory Dominic Raab, said the scale of the US and UK surveillance operation should act as a wake-up call to MPs.

"There is no doubt in my mind that we benefit from the intelligence and security agencies," Huppert wrote in an article for the Guardian. "Their work does help keep us safe. However, we must ensure that as parliamentarians and lawmakers we give them a clear framework to operate in and proper oversight, scrutiny and evaluation to keep them on track. They should welcome this as well."

Huppert said that under the current legal framework spies had an "almost completely free rein", and questioned whether the intelligence and security committee, which is supposed to scrutinise the agencies, was fit for purpose. "[It consists] of a small number of parliamentarians, handpicked by the prime minister, and includes ex-ministers who effectively scrutinise the decisions they themselves made. It is not clear to me they all understand the technical capabilities they are supposed to comment on."

Raab added his voice to the growing debate on Wednesday, saying he had seen no evidence that the Snowden revelations had damaged national security.

"Newspapers and politicians and members of the public have to make sure we don't impair this country's national security. But I have to say I haven't seen or heard or read anything which isn't really about political embarrassment for either the agencies or the government," Raab said. "I think we have to be very careful we don't let national security be a fig leaf to shout down proper debate about the oversight and accountability of the security services."