The court battle, which has been ongoing for about a year, emanates from the police’s refusal to declassify documents needed by Ipid for the investigation of three high-profile corruption cases.

The police believe the documents contain information that may compromise national security as well as the identities of intelligence operatives. But Ipid says the documents were classified illegally in order to conceal various crimes, including rampant corruption involving police management.

At the centre of the allegations is a company called Brainwave Projects, trading as I-View Integrated Systems, which is said to have received about R54m from the police through various contracts awarded irregularly.

In his affidavit, McBride says Ipid’s investigations found that during the #FeesMustFall protests in 2016, the police’s crime intelligence paid I-View R33m for software to monitor social media sites without following procurement processes.

Ipid is also investigating the purchase of a cellphone grabber - a device used to intercept phone calls - at a grossly inflated price.

The police allegedly paid I-View R45m for the device, which is said to cost between R7m and R10m on the market. McBride alleges that the money was to be laundered for the buying of votes at the ANC’s national conference.