Seventy of the world's leading human rights organisations have written to David Cameron to warn that the government's reaction to the mass surveillance revealed by Edward Snowden is leading to an erosion of fundamental rights and freedoms in the UK.

The coalition, which includes organisations from 40 countries, said it had become increasingly alarmed at the way the UK government had applied pressure on media groups covering the leaks and its use of national security concerns to close down important public interest debates.

"We have joined together as an international coalition because we believe that the United Kingdom government's response to the revelations of mass surveillance of digital communications is eroding fundamental human rights in the country," the letter states. "The government's response has been to condemn, rather than celebrate investigative journalism, which plays a crucial role in a healthy democratic society."

The intervention comes five months after the Guardian, and major media organisations in other countries, including the New York Times and the Washington Post, began disclosing details of the extent and reach of secret surveillance programmes run by Britain's eavesdropping centre, GCHQ, and its US counterpart, the National Security Agency. The revelations – now appearing in European media outlets – have sparked a huge debate on the scale and oversight of surveillance by the US and UK intelligence agencies.

The open letter to the prime minister, which was organised by Article 19 in the UK and is signed by groups from the US to Malaysia and Israel, says the British government response has damaged the country's longstanding reputation for freedom of expression and a free press.

"The UK has a strong history of democracy, and while targeted surveillance may play an important role in protecting national security, in doing so it should not erode the very values it seeks to protect. We call on you to honour the UK's international obligations to defend and protect the right to freedom of expression and media freedom, and to end the UK government's pressure on the Guardian and those who assist them."

The letter, signed by Liberty, Privacy International and Reporters without Borders, highlights the detention of David Miranda, the partner of the former Guardian journalist Glenn Greenwald, under schedule 7 of the Terrorism Act 2000 in August, which is subject to an ongoing challenge at the high court, and what it describes as the sustained pressure the government has brought to bear on the Guardian.

"We believe these actions clearly violate the right to freedom of expression, which is protected under British, European and international law … We also believe that this use of national security will have dangerous consequences for the right to freedom of expression and media freedom in the UK and beyond, creating a hostile and intimidating environment and discouraging those who could reveal uncomfortable truths and hold those in power to account."

Last week Cameron issued a veiled threat to take tougher measures against the Guardian and other newspapers that have covered the story. "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."

He has also encouraged a parliamentary select committee to investigate whether the Guardian has broken the law or damaged national security in its reporting.

Thomas Hughes, the executive director of Article 19, said Cameron's response had been to shoot the messengers rather than engage with the wider issues that had been raised.

"Edward Snowden, David Miranda, Glenn Greenwald and the Guardian are being painted as the villains of this piece. They are being targeted for raising a matter of serious public interest. This seems to be a convenient distraction from what might otherwise be a story about state overreach and inadequate oversight of power."