Investigative journalism centre amaBhungane walked out of court victorious on Monday after successfully challenging parts of South Africa's surveillance law, the Regulation of Interception of Communications and Provision of Communication-Related Information Act (RICA).
The Gauteng High Court in Johannesburg declared mass surveillance and the interception of foreign signals by the National Communications Centre "unlawful and invalid".
The legal battle against RICA started in April 2017 after amaBhungane received confirmation that its managing partner, Sam Sol, had been under surveillance under RICA.
At the time, Sole was investigating a National Prosecuting Authority (NPA) decision to drop corruption charges against former president Jacob Zuma.
amaBhungane demanded to know the basis for the surveillance and although it never received detailed reasons, it received State Security Agency confirmation that there was an order from a judge allowing the interception.
The investigative journalism unit's first challenge targeted the constitutionality of several provisions of RICA, which permits the interception of communications of any person by authorised state officials, subject to prescribed conditions.
The second challenge related to "bulk interceptions" of telecommunication traffic by the State on the basis that no lawful authority exists to do so.
Judge Roland Sutherland said part of the dynamic of investigative journalism was for investigative journalists to obtain information from whistleblowers and others who inform on their bosses without wanting to be identified.
Therefore, a need to keep sources private and secretive is "axiomatic to the exercise".
Among the five orders granted, was an order that sections 16(7), 17(6),18(3)(a), 19(6), 20(6) and 22(7) of RICA were inconsistent with the Constitution and invalid to the extent it failed to prescribe procedures for notifying the subject of the interception.
"RICA, including sections 16 (7) thereof, is inconsistent with the Constitution and accordingly invalid to the extent that it fails to adequately provide for a system with appropriate safeguards to deal with the fact that the orders in question are granted ex parte (without notice) and the declaration of invalidity is suspended for two years to allow Parliament to cure defect."
He suspended the declaration of invalidity for two years to give Parliament time to amend the act.
Speaking outside the court, Sole said he was happy with the judgment because amaBhungane had approached the courts so that journalists, specifically investigative journalists, would be able to give people a form of guarantee or assurance that their identities will not be disclosed.
"That's key to us being able to get people to talk to us. And if there is a general perception that the State can just call up Sam's phone records and see exactly who he is talking to without any problem, [it] has a chilling effect on our ability to get information," Sole said.
There was no costs order.