Secrecy laws planned for South Africa fundamentally threaten free speech and investigative journalism, and could have a chilling effect on the rest of Africa, a united front of human rights lawyers, newspaper editors and Nobel prize-winning writers have warned in interviews with the Guardian.

The protection of state information bill – dubbed the "secrecy bill" – envisages draconian penalties of up to 25 years in prison for whistleblowers and journalists who possess, leak or publish state secrets. It has been described as the first piece of legislation since the end of apartheid in 1994 to undermine South Africa's democracy.

Opponents of the bill fear that, with South Africa often regarded as a beacon of democracy and freedom on the continent, it could be used as an excuse by repressive African regimes for renewed crackdowns on journalists and activists.

Among those to attack the proposed legislation is JM Coetzee, the Nobel laureate and double Booker prize winner, making a rare public intervention.

"The legislation is transparently intended to make life difficult for pesky investigative journalists, and generally to save incompetent or corrupt bureaucrats from being embarrassed," Coetzee, born in Cape Town but now resident in Australia, said in an email. "Its sponsors have very likely been emboldened by the push that has taken place all over the western world since 2001 to erect a wall of secrecy around the more dubious actions of the state, and to make it a crime to breach that wall."

Coetzee joins fellow Nobel laureate Nadine Gordimer in calling global attention to measures they believe are calculated to help the government conceal evidence of corruption. Gordimer, whose books were banned under white minority rule, said: "It is quite obvious why this bill has come about – the government is making no attempt to hide the truth that its intention is to aid the cover-up of corruption.

"I wrote during the apartheid regime and I fought against the apartheid regime. Three of my books were banned. What we are doing now is going back to apartheid censorship under a new guise."

Today, South Africa boasts arguably the freest press in Africa, with no shortage of revelations about shady deals or satirical cartoons lampooning politicians' foibles. Freedom of expression, including freedom of the press and other media, has been protected under the constitution. But opponents of the bill believe the gains of the past 18 years are under threat and warn that the rest of the continent is watching. In neighbouring Zimbabwe, journalists continue to be harassed and arrested, while state broadcasters remain firmly under President Robert Mugabe's control.

Andrew Feinstein, a former African National Congress (ANC) MP whose exposure of a corrupt multibillion-pound arms deal might have resulted in his prosecution under the new laws, said: "I think that if this democracy continues to weaken – and I believe it has over the past few years – there is no doubt that that has a knock-on effect, because I think for many countries in Africa the comparison is always made with South Africa as this bright shining star of democracy. If that comparison no longer holds, it lets a lot of other countries off the hook in many ways."

Nic Dawes, editor of South Africa's Mail & Guardian newspaper, said: "We're already hearing from people elsewhere on the continent that their politicians and government officials are saying to them: 'You see, they're even doing this in South Africa, so there's no reason why we shouldn't be doing it here.'

"That's one of the most dangerous things about the bill: the excuse it will give to other countries elsewhere in the region, that had been opening up, to begin to tip in the other direction. It's really very disturbing."

South Africa, in turn, is feeling the repercussions of the phone hacking saga and debate over press regulation in Britain, Dawes added. "Almost every time that I have a discussion with someone about either the protection of state information bill or the ANC's proposals for statutory media regulation, the British phone hacking scandal is brought up as an example of why these kinds of moves are necessary."

The governing ANC defends the bill as a necessary update to laws made 30 year ago during apartheid. The party claims it will tighten national security and is not aimed at the media. The bill is under review by South Africa's parliament and, following pressure from activists, has already been subject to many revisions.

But hopes of a climbdown on the bill were dashed on Wednesday when the state security department rejected amendments proposed by the ANC. Dennis Dlomo, the department's acting director general, rejected calls to limit the power of the ministry to delegate classification powers, reduce penalties and limit the heavy onus placed on the accused.

Dlomo also shrugged off pressure from campaigners to include a public interest defence clause, saying: "They want a post-disclosure test of public interest. We want a pre-disclosure test. The last point on this is really simple. What if a whistleblower gives away top secret, legitimately classified information?"

In response Alf Lees, an MP for the main opposition party, the Democratic Alliance, asked: "The department surely does not want to create the impression that it wishes to protect alleged criminals or punish those who earnestly expose corrupt and criminal behaviour?"

Keeping up pressure for reform is vital, according the civil society alliance Right2Know, which has organised protests against the bill. Murray Hunter, one of its coordinators, said: "The secrecy bill has united people across the boundaries of space, race, class and ideology – from leafy suburbs to townships and informal settlements, shop floors and office blocks, university campuses and old-age homes. We can't stop pushing now; in fact, now's the time to start."