Two senior UN representatives have warned the British government that the protection of state secrets must not be used as an excuse to "intimidate the press into silence" following the detention of David Miranda under the Terrorism Act.

Frank La Rue, the UN special rapporteur on freedom of expression, issued the caution as he called for a public debate on the mass surveillance revelations exposed by the National Security Agency whistleblower Edward Snowden.

"The protection of national security secrets must never be used as an excuse to intimidate the press into silence and backing off from its crucial work in the clarification of human rights violations," said La Rue. "The press plays a central role in the clarification of human rights abuses."

La Rue and Ben Emmerson, the UN special rapporteur on human rights and counter-terrorism, have written to David Cameron's government requesting further information on the legality of Miranda's detention at Heathrow airport on 18 August.

Documents and electronic devices carried by Miranda, the partner of the Guardian journalist Glenn Greenwald, were seized by the Metropolitan police when he was held for questioning for nine hours under schedule 7 of the Terrorism Act.

La Rue said: "It is clear that the revelations on the extensive mass surveillance initiatives implemented by some governments needs to be widely debated.

"The intimidation of journalists and newspapers questioning alleged abuses by intelligence bodies is certainly not a contribution to the open debate that needs to take place. Under no circumstances, journalists, members of the media, or civil society organisations who have access to classified information on an alleged violation of human rights should be subjected to intimidation and subsequent punishment."

Emmerson, a London-based independent expert for the UN, said the NSA revelations had proved the need for a debate on "the extent to which the public in both [the UK and US] is prepared to tolerate official access to metadata".

He added: "The powers used in this case are currently under challenge in the European court of human rights. I urge the British authorities to review their operations to ensure that they comply fully with the UK's obligations under the European convention on human rights regarding the right to liberty and security, and the right to respect for private and family life."

The UN experts' comments came as a senior Brazilian official said that Dilma Rouseff, the country's president could cancel a planned White House visit and downgrade commercial ties after it was reported that the NSA had spied on her private communications. Rousseff is due to make a formal state visit to Washington next month to meet Barack Obama and discuss a possible $4bn fighter plane deal, cooperation on oil and biofuels technology, as well as other commercial agreements.

On Wednesday, Obama raised for the first time the prospect of new legislation to limit the powers of the NSA. Answering a question at a joint press conference with the Swedish prime minister on his way to the G20 summit in St Petersburg, Obama said there were "legitimate questions" about the NSA. He saidthat existing laws may not be sufficient to deal with advances in technology that have allowed it to gather much more data than before.

Until now, Obama has only proposed limited changes and is awaiting recommendations from a review body he set up.

Defending the NSA, he said the US, like other countries round the world, had an intelligence operation aimed at improving the country's understanding of what is happening globally. Since 9/11, he added, a lot of energy had been focused on counter-terrorism.

"There have been times where the procedures, because these are human endeavours, have not worked the way they should and we had to tighten them up," Obama said in Stockholm. "And I think there are legitimate questions that have been raised about the fact that as technology advances and capabilities grow, it may be that the laws that are currently in place are not sufficient to guard against the dangers of us being able to track so much."

In the high court last month, Britain's deputy national security adviser, Oliver Robbins, said the government urgently needed to identify the material seized from Miranda to assess the risk to "sensitive intelligence sources and methods and the threat to intelligence agency staff" if the data fell into the hands of "hostile actors".

However, the Guardian editor-in-chief, Alan Rusbridger, suggested the government had moved with little urgency since early June and that its rhetoric was an attempt to exploit the "dismaying blurring of terror and journalism".

• To contact the MediaGuardian news desk email media@theguardian.com or phone 020 3353 3857. For all other inquiries please call the main Guardian switchboard on 020 3353 2000. If you are writing a comment for publication, please mark clearly "for publication".

• To get the latest media news to your desktop or mobile, follow MediaGuardian on Twitter and Facebook