The ANC on Thursday drove final amendments to the Protection of State Information Bill through the National Council of Provinces amid protest, bringing the so-called secrecy bill two steps from becoming law.
In an often raucous debate, State Security Minister Siyabonga Cwele claimed it was the most progressive official secrets legislation worldwide. The Democratic Alliance countered that it remained reminiscent of a police state.
The amended bill was adopted by 34 votes to 16, and will go back to the National Assembly in the new year, where the ANC majority is likely to pass it with ease.
Opposition parties vowed that if that happened they would ask the Constitutional Court to overturn the legislation, a threat also issued by the Right2Know campaign this week.
DA MP Alf Lees accused the ANC of misleading the public by claiming extensive amendments to the bill had ruled out the possibility of a state official using it to conceal wrongdoing.
"Given the levels of corruption we see in government today it is inevitable that the bill will be used to cover up crime and corruption by those who risk exposure," he said to ANC jeers.
Lees said the bill still imposed excessive prison sentences, raised the spectre of journalists being jailed for espionage and lacked a proper public interest defence clause to protect the media and whistle-blowers.
His colleague, Albert Fritz, added that if it had been on law, the recent Sunday Times report on the corruption case against President Jacob Zuma - based on leaked prosecuting authority information -- would never have seen the light.
"This bill is Stasi-like in its content and design," he charged, referring to the feared former East German secret police.
Cwele said remaining opposition to the bill was the result of a campaign of misrepresentation by the opposition and civil rights activists.
He conceded that the bill lacked a public interest defence, and that its definition of national security as the grounds for classification was wider than that in the apartheid-era legislation it seeks to repeal, the 1982 Protection of Information Act.
But he said the latter was designed to "protect the people", while the new one was motivated by the belief that it was unwise to let ordinary citizens decide whether disclosure would serve the public interest.
"The problem with the public defence clause is the associated risk where any member of the public can decide what is in the public interest, when the head of [an] organ [of state] or courts for instance may be in a better position to objectively weigh up the issues."
The ANC said it was sure the bill would withstand a constitutional challenge.
"You can go to the Constitutional Court, we are waiting for you," the ANC's Teboho Chaane said.
The Right2Know Campaign maintains the bill still clashes with the constitutional rights to freedom of information and expression and is likely to lead to over-classification.
Addressing this point, Cwele said these were not absolute rights, but that on the contrary the Constitution recognised the supremacy of security requirements.
"It needs to be emphasised that the rights in our Constitution... are not absolute as they are subject to section 36, which limits these right. No such limitation exists on the provisions of chapter 11 pertaining to national security and the security services and their oversight structures."
The minister acknowledged that the bill has become "one of the most talked about pieces of security legislation here and abroad", but insisted the final draft balanced transparency and security.
The bill was introduced in 2010 and triggered a sustained public outcry that forced the ruling party into a staged withdrawal from some of its most regressive provisions.
This week, after coming under renewed pressure from the Congress of SA Trade Unions, the ANC introduced eleventh hour changes that were widely welcomed. It notably re-inserted a clause offering protection against prosecution for those who reveal classified information to expose a crime, despite pressure from Cwele to scrap it.
The party scrapped a clause that would have made the new legislation trump the Promotion of Access to Information Act, and thirdly gave the Public Protector and other chapter nine institutions the right to be in possession of classified information.
But opponents say the bill retains a clear threat to democracy in clauses that make mere possession of a classified document a crime and allow the intelligence structures to operate in obscurity.