Robert Mugabe is not an advocate of the rule of law or an independent judiciary. Neither is Vladimir Putin. In his short presidential career, Donald Trump has attacked judges who have upheld legal challenges to his attempt to ban Muslims entering the US. If James Comey’s explosive testimony is to be believed, he has also sought to impede the FBI from conducting an independent investigation. Trump too, it seems, is not a fan.

Trumpishness is increasingly fashionable in Australia’s conservative ranks. In the space of 24 hours former prime minister Tony Abbott and three other senior government ministers have seemingly tried to set fire to a cornerstone of Australian democracy: the rule of law. A veritable “bonfire of sanities” has resulted in the three ministers being hauled before the Victorian supreme court to explain why they should not be charged with contempt of court and has attracted universal condemnation from the legal profession.

The rule of law, a fundamental tenet of democracy, is not popular with unenlightened politicians because it operates as a check on abuses of power. It forms an important part of the doctrine of separation of powers. In 1748, French philosopher Charles de Montesquieu wrote that a nation’s freedom depended on three sources of power – legislative, executive and judicial – with each having their own separate powers. In Australia, the constitution carves out the role of interpreting and applying our laws to an independent judiciary – independent from improper influence of the legislative and executive arms of government.

Independent judges can’t be corrupted by donations, bribes or threats by politicians or any others to toe the line. Independent judges decide cases on their merits, applying laws to the cases presented to them. Politicians, like every other citizen, are not above the law, as Eddie Obeid and Ian Macdonald have recently discovered. Governments, both state and federal, appear routinely before the courts defending claims that they have breached the laws of the land.

Incarcerating and torturing refugees may have been a vote winner for Australian politicians since 2001, but it is another thing altogether when refugees ask that their cruel mistreatment be scrutinised by the courts.

For years, refugees caught up in Australia’s mandatory detention nightmare have sued the federal government seeking compensation for the damage to their health. In late October 2003, I flew to Sydney to launch a negligence case against then immigration minister Philip Ruddock and the federal government. My client was an eight year old Iranian boy whose health had catastrophically collapsed while in detention. His doctor reported that upon examination, the boy presented like “a sad little old man”. The case settled for $400,000 in damages three years later.

There have been many such settlements of similar claims by refugees since then. They have followed a predictable pattern with the commonwealth strongly defending them for years, driving up legal costs, and then settling just before trial. The cases do not proceed to trial because torturing refugees is unlawful and the politicians are desperate that the shroud of secrecy over the conditions in detention is not lifted. If there was transparency about this grim business, mandatory detention may not be so politically popular.

In this context, the announcement of the settlement of a class action for those who have been incarcerated under brutal conditions on Manus Island in Papua New Guinea on Wednesday was entirely predictable. It followed the usual script.

However, on the day the Manus settlement was announced, Tony Abbott unleashed an extraordinary attack on the judges who administer our legal system, stating that: “We’ve got a judiciary that takes the side of the so-called victim rather than the side of common sense.” He inferred that judges were not doing their job properly because of a bias in favour of refugee claims. On one interpretation of Abbott’s statement, Justice Michael McDonald, who was due to hear the class action, was biased.

On the same day, the Australian newspaper published comments by three Turnbull government ministers, all with law degrees, attacking Victorian supreme court judges. The judges are currently hearing an appeal by the commonwealth against a single judge’s sentencing decision in a terrorism case. Assistant to the treasurer Michael Sukkar singled out comments made by the judges in the course of the appeal hearing, decontextualised them and argued that it is “the attitude of judges like these which has eroded any trust that remained in our legal system”.

Eroded any trust in the legal system? The comments were inflammatory, disingenuous and arguably in contempt of court. The judges are not impressed. The supreme court has summoned the three Ministers to appear before it on Friday to try and explain why their attacks should not be referred to prosecutors to consider contempt of court charges. Needless to say, this situation is extremely unusual.

In the words of judicial registrar Ian Irving the “attributed statements appear to intend to bring the Court into disrepute, to assert the judges have and will apply an ideologically based predisposition in deciding the case or cases and that the judges will not apply the law.”

If, as Sukkar suggests, there is no longer any trust in the legal system, why was ACTU Secretary Sally McManus so roundly attacked earlier this year by the federal government for questioning unjust laws and the rule of law? Her comments prompted Malcolm Turnbull to condemn her statements as an example of a “culture of thuggery and lawlessness” in the union movement and the Labor party.

Indeed, for over a century, every time a trade unionist has gone near a picket line, a conservative politician invoking the rule of law has never been far away. Typical of this genre is Tony Abbott on the construction industry. His Facebook page reads: “We need to restore the rule of law in our construction industry. Bring back the ABCC.” When the construction union is being prosecuted in the courts, Abbott wholeheartedly approves of the work of independent judges.

It’s a different matter when the government is defending its conduct before the courts, it seems.

As former chief justice Murray Gleeson has observed:

“It is self-evident that the exercise of [judicial review] will, from time to time, frustrate ambition, curtail power, invalidate legislation, and fetter administrative action […] This is part of our system of checks and balances. People who exercise political power, and claim to represent the will of the people, do not like being checked or balanced.”

In recent times , contentious political issues including the treatment of refugees and the scourge of terrorism have proven a test of the robustness of Australia’s democracy. Politicians seeking to exploit fear, including by criticising decisions of the courts, are able to freely do so. The situation becomes more fraught when they attack individual judges, or move into the sphere where their criticisms look suspiciously like an attempt to influence judges in their deliberations. The three Turnbull government ministers could face being charged with contempt of court for their public comments.