The view is gathering in New South Wales that the nation’s most effective anti-corruption watchdog, the Independent Commission Against Corruption, is going to be put to the sword by the High Court of Australia.

Its crime? Too much success in naming and shaming venal politicians, corrupt public servants and dodgy developers.

Or, as His and Her Honours would have it, “ICAC is guilty of over-reach”.

This week, five of the seven judges of the High Court heard an appeal against ICAC’s proposed public inquiry into senior Crown prosecutor Margaret Cunneen. Their judgement, to be released “shortly” (before the state election on March 28 or after?), will decide the watchdog’s fate.

The establishment of ICAC was an election pledge by former premier Nick Greiner when he led the Coalition to a landslide victory in 1988.

Greiner’s intention was to clean up the scandalous mess which had corroded the NSW superstructure during the decade-long rule of the late Neville Wran QC.

Dozens of files gathered by the Liberal Party — and the incoming government’s cabinet secretary, Gary Sturgess — were sent to then-attorney-general John Dowd and the first ICAC commissioner, Ian Temby QC, with the intention of staging a roving review of past practices by Wran and his lieutenants.

Sturgess, a Mormon known as “the Lord of the Files”, had kept copious documents on corrupt chief magistrate Murray Farquhar, equally corrupt police commissioner Norm Allan, jailed corrective services minister Rex Jackson and many more.

The arrival of ICAC created palpable tension within the three main political parties, CBD law firms, barristers’ chambers, academic law schools, government departments, the media, council chambers across the state and the well-heeled executive suites of property developers. Even families from the political and legal classes were divided, and long personal friendships became strained.

Although he commanded a sweeping parliamentary majority, Greiner needed bipartisan support for his ICAC, and the new opposition leader, Bob Carr, a former Bulletin journalist, was determined to deliver.

“Carr put his embryonic leadership on the line over the introduction by Nick Greiner’s government of an anti-corruption watchdog,” wrote journalist Andrew West in his biography of the NSW Labor leader.

But his party was split with a collection of right-wingers determined that ICAC should be buried. Their vehemence was recorded by Carr’s press secretary Malcolm McGregor, now Lieutenant Colonel Cate McGregor, who attended the ALP’s national conference in Hobart in June 1988.

Writing about a meeting in Graham Richardson’s hotel suite, McGregor said: “Inside are Richardson and Loosley [NSW ALP general secretary Stephen Loosley] swaggering around saying, ‘We can’t live with this, you’re going to have to vote this down’. They were talking about Greiner’s ICAC.”

Loosley was a dedicated opponent of ICAC, telling Carr’s biographers: “The Tories were determined to go through us in a re-creation of the [McCarthyite] House Un-American Activities Committee. We figured this was a dagger pointed right at us.”

As they walked down the hotel corridor after the meeting, Carr said to McGregor: “What a cheap-jack caper. What a B-grade gangster movie script that was.”

McGregor recorded: “He [Carr] essentially told them to piss off.”

Michael Egan, a Carr loyalist who later served as NSW treasurer, wrote an angry note to Carr saying: “Your stand on the ICAC is foolish, wrong, abject and craven. You will pay for it, if not in this life, then certainly in the next. It is the most contemptible and dangerous legislation I have ever seen. You are responsible for it.”

But Carr was unmoved, later telling the ABC journalist Quentin Dempster: “I support ICAC. It keeps my party’s criminal faction in check.”

Temby broke the Coalition’s heart when he made clear that past files on the Wran era would not be reopened and dismissed his ALP critics saying they were “political headkickers doing what they are good at”.

In its first public inquiry into northern NSW development scandals, ICAC almost claimed the scalp of deputy premier Wal Murray, the Nationals leader. Two years later, it claimed Nick Greiner’s premiership, although the Court of Appeal later cleared him of any wrongdoing.

Just over one year ago, another Liberal premier, Barry O’Farrell was felled by ICAC revelations of a gift of a bottle of Grange.

The commission is in a state of morbid limbo awaiting the High Court’s judgement while the forces of darkness are lining to demand the incoming state government put a muzzle on the watchdog, restricting its public hearings, investigative powers and budget.