Edward Snowden said, "Wow." Yes, this judgment is so significant that the world's most important whistle-blower and authority on state surveillance took note.Snowden was reacting to a tweet by Privacy International, a UK-based advocacy organisation that presented evidence as a "friend of the court" together with local transparency activists Right2Know.@privacyint tweeted: "The rule of law prevailed today! Six years after @Snowden's revelations, the High Court of South Africa declared that bulk interceptions practices are unlawful. The case was brought by @amaBhungane, we intervened with @r2kcampaign."AmaBhungane's application, launched in 2017, challenged the constitutionality of elements of RICA, the Regulation of Interception of Communications and Provision of Communication Related Information Act 70 of 2002.RICA is the law which permits the interception of communications of any person by authorised state officials subject to prescribed conditions. We argued that the protections built into the act to prevent abuses of this necessary invasion of privacy were not constitutionally up to scratch. We also challenged the practice of the intelligence services in conducting so-called "bulk interception" on the basis that there was no law that gave them the right to do that.Bulk surveillance is a method of monitoring transnational signals in order to screen them for certain cue words or key phrases. It also allows operators to enter target phone numbers or electronic addresses and signatures in order to monitor the electronic lives of individuals of interest.The state position was that it did not need anybody's permission to do this, despite the fact that, as the judge put it, this form of monitoring would also capture communications between two South Africans, both of whom were in South Africa, provided the signal passed through a server located outside South Africa.We're talking WhatsApp, Skype, Gmail, internet browsing, location tracking, etc etc – all available at the touch of a keyboard.Because it's so easy and, unlike interceptions under RICA, doesn't require a judge's approval, our suspicion was that bulk interception is where a lot of abuse takes place – here, as is the case elsewhere, as Snowden's leaks showed.These tools are so powerful that intelligence services globally are very reluctant to place them under supervision – so Judge Roland Sutherland's determination that "the bulk surveillance activities and foreign signals interception undertaken … are unlawful and invalid" is unprecedented.The State Security Agency (SSA) is now in a tight spot.As Sutherland put it: "The Answering Affidavit of [Arthur] Fraser, then the Director-General of Intelligence, says that bulk interceptions is common practice in many countries. This is, indeed, a notorious fact. However, even were it to be assumed, for the purpose of this analysis, that bulk interceptions per se, or subject to certain conditions, is a good idea, or even a practice that any sovereign State cannot do without, despite its distaste for the practice, the least that can be required is a law that says intelligibly that the State can do so."He noted: "Our Law demands such clarity, especially when the claimed power is so demonstrably at odds with the Constitutional norm that guarantees privacy."Sutherland pointed out that the National Strategic Intelligence Act, into which the state sought to shoehorn an implied enabling of bulk interception, did nothing of the sort. The judge also took an axe to the state's position on RICA.AmaBhungane argued that RICA's scheme was inherently problematic in that the subjects of surveillance were usually unaware that their privacy had been invaded. When a judge issues a physical search warrant, he understandably does so in secrecy, so as not to tip off the target. But once the raid is carried out, the target is inevitably aware and can go to court to test if there was a justifiable basis for the search. Electronic interception is an intrusive search that we generally never know about, unless we stumble upon the evidence – as happened in my case.In April 2015, it emerged that my communications had been intercepted in 2008, something we had long suspected, but could not prove. This happened when Michael Hulley – then attorney for President Jacob Zuma – attached to court papers extracts from official intercepted conversations between Advocate Billy Downer and myself. Downer was the senior advocate who led National Prosecuting Authority (NPA) team investigating various charges against President Jacob Zuma relating to the notorious "arms deal".In 2008 I had some confidential exchanges with Downer about the investigation. Unbeknown to us they were recorded by the intelligence services, based on a judge's authorisation under RICA.In 2015 Hulley extracted these conversations from the so-called "Zuma spy tapes" – the interceptions, mainly of the NPA's Leonard McCarthy, that were illegally leaked to Hulley and then used to argue that the NPA's case against Zuma was tainted.Hulley tried to make a similar point about my communications with Downer, but they were innocuous.Nevertheless, we now had proof I had been officially bugged – and that fact formed the foundation and impetus to bring the much broader case to challenge aspects of RICA.The knowledge that the state has been intercepting your private and professional communications (for six months, it turned out) prompts a hard look at the protections contained in the law. We concluded they were threadbare.If you are never notified you were bugged, how do you ever vindicate your right to privacy?On what basis did the judge designated under RICA to issue secret interception warrants grant this order? What was he (it was a he) told? Was he independent – or was he effectively an adjunct to the services he is supposed to police?What happened to the six months of my life that was in the possession of the state? Was it destroyed? Was it shared? Was it kept, to be used in some other way to discredit me?What about the confidentiality of my sources as a journalist? My work put me in constant conflict with elements of government. How easy was it for them to reach for this tool to identify who journalists are talking to?The answers offered by RICA were not reassuring, so amaBhungane took them on, based on our mandate to challenge laws and practices that impede journalism.In his ruling, Sutherland supported all our areas of concern, declaring the relevant provisions of RICA unconstitutional and giving Parliament two years to fix the problems. But until then it's not business as usual for the spies. Sutherland set out an interim regime until the law is revised.Firstly, he agreed that RICA was constitutionally flawed because it makes the secrecy of interception permanent. His solution compels notification to the target within 90 days of the expiry of the interception order. Obviously, there are cases where this would jeopardise an investigation and the ruling makes provision for judges to extend the secrecy period.Secondly, he agreed the way the designated judge is appointed undermines their independence. Currently a retired judge is selected by the minister of justice for renewable (and remunerated) periods of office. Sutherland's interim solution is that the judge should be nominated by the chief justice and appointed for a non-renewable period of two years.Thirdly, Sutherland found that RICA fails to provide adequate safeguards to deal with the fact that the orders in question are granted ex parte (ie in secret, without hearing the other side). He left it to Parliament to decide on a remedy, for example, the appointment of a permanent amicus or public advocate or a panel of three judges, instead of just one.Fourthly, he found the statute fails to prescribe proper procedures to be followed when state officials are examining, copying, sharing, destroying or storing the data obtained from interceptions – but again left this to Parliament to fix.Finally, Sutherland gloriously vindicated the role proper professional journalism plays in our constitutional scheme – and therefore the safeguards it should be accorded, especially with regard to the protection of confidential sources.He noted: "Despite much lauding of the role of the media and the express guarantee of freedom of expression and of the media … there has been a reluctance to take the next step needed to recognise journalists as a special class of persons whose intrinsic working methods warrant especial protection, such as lawyers enjoy."If journalists' work had constitutional value, Sutherland asked, "Why be precious about recognising the critical instrumentality of confidential sources in producing that valuable output?"He observed somewhat tartly: "In a country that is as wracked by corruption in both our public institutions and in our private institutions as ours is, and where the unearthing of wrongdoing is significantly the work of investigative journalists, in an otherwise, seemingly, empty field, it is hypocritical to both laud the press and ignore their special needs to be an effective prop of the democratic process."Sutherland has referred this matter to Parliament, but in the interim has ruled that any interception application must draw to the designated judge's attention if the subject is a journalist or practising lawyer – and that the judge must take this into account when deciding whether to grant the order.So, together with the ruling on bulk interception, this was a 6-0 trouncing.That outcome was fairly predictable.Our arguments were solid and our demands circumspect, whereas the state adopted, in Sutherland's words, "an absolutist stance" that brooked no compromise of the state's discretion in matters of security, despite the admitted weaknesses of the legislation.Instead they opted for bluster and an approach, at least in Fraser's affidavit on behalf of the SSA, which amounted to: Trust us, we're professionals.That argument looked thin even before Fraser was effectively fired for undermining the Inspector General of Intelligence – and before President Cyril Ramaphosa's intelligence review panel uncovered Fraser's sinister plans to set up a huge parallel intelligence structure completely outside the normal oversight provisions governing the SSA.As I tweeted after the ruling: "We told them. They've had two years to fix this. But no, faction fighting was prioritised. So busy protecting the King, they don't realise they are also naked."The oncoming train of this judgment, its bright light and inexorable path, was quite visible when we lodged the court application in April 2017. Now it has arrived at the spot where the state had tied itself to the twin rails of its own incompetence and arrogance.Now there is a crisis and the SSA is "regrouping with its legal team to figure out a way forward".This saga has a wider resonance.The fight in South Africa is between constitutionalists and the anti-constitutionalists: those like Zuma and his EFF cousins who peddle an authoritarian fantasy."If you just give me six months to be a dictator, things will be in order," Zuma said in 2016."Shaka ruled for 12 years. Look at us, we have ruled for 23 years and we are still crying. Democracy should have authority. Once there is no authority in democracy, it becomes worse than a dictatorship, it becomes more dangerous."But Zuma worked for a decade to undermine the authority of democracy by building parallel structures of corrupt patronage and personal and party loyalty. Now the state is so damaged that its ability to meet the minimum standards set by the Constitution is in doubt at nearly every turn. If we do not fix the state, it will break the Constitution.Then the dictators will come.And who will the spies serve then? * The amaBhungane Centre for Investigative Journalism and Sam Sole, its managing partner, were the applicants in the matter. The amaBhungane Centre for Investigative Journalism, an independent non-profit, produced this story. Like it? Be an amaB Supporter to help us do more. Sign up for our newsletter and WhatsApp alerts to get more.