Imagine you were charged with a serious crime. Then, you found out your lawyer – whether it’s a silk from the top end of town or one from Legal Aid – was only pretending to work for you. Worse, she actually turned out to be helping people who were trying to put you behind bars.

This is what happened in the case of Lawyer X, or informant 3838, who, while representing some high profile criminal defendants, was also registered as a police informant.

The Royal Commission into the scandal – being Victoria Police’s recruitment and management of Lawyer X and people like her – has barely started and already a Royal Commissioner has resigned.

Yesterday it was disclosed informant 3838 was first registered with the police in 1995 – this is ten years before what was understood to be the case when the Royal Commission was established in December, 2018. Before it was believed she was first registered in 2005.

Royal Commissioner Malcolm Hyde’s time in Victoria Police overlapped with the time of Lawyer X’s first time as an informant, which has the potential to be a conflict of interest.

A statement issued by the Victorian government yesterday noted:

The Commission has advised that information willingly disclosed to it by Victoria Police indicates that the informant at the centre of this matter was first registered in 1995 and that there are further informants who held obligations of confidentiality, who may be relevant to the Royal Commission.

The terms of reference will now be expanded so the inquiry can look into more of Lawyer X’s past.

While we don’t know at this stage precisely what Lawyer X did, we know she was a bad lawyer in at least one way: she profoundly betrayed her clients, with the police’s full knowledge.

As far as we know, nothing like this has happened before – anywhere. Nevertheless, it’s easy to predict the consequences for Lawyer X’s clients. Unless she had next to no role in their defence, all the results of any trial where she represented them - including their criminal convictions and any sentence - could likely be cancelled.

That’s because no-one can be convicted or punished for a crime unless there has first been a fair trial. Victoria’s Charter of Human Rights and Responsibilities says:

A person charged with a criminal offence or a party to a civil proceeding has the right to have the charge or proceeding decided by a competent, independent and impartial court or tribunal after a fair and public hearing.

Australia’s High Court has said the same for decades.

Judges expect lawyers before them to put two things first: their client and the courts. They expect lawyers to disclose conflicts of interest and they also expect the government in criminal cases to disclose anything of importance to people being prosecuted.

Lawyers, like anyone else, can sometimes opt to become police informants, but the one thing they cannot do is inform on people they are representing in court. The courts will never tolerate a criminal defendant’s lawyer secretly helping the opposing side in a trial.

That’s why the High Court said late last year that what Lawyer X and the police did “corrupted” the prosecutions of her clients and “debased” the criminal justice system.

Read more: Victorian royal commission into policing needs to take a broad approach: here's why

The problem isn’t just the details of whatever secrets she betrayed and what advantages the police and prosecutors received. It’s also whether her role as a police informant so “corrupted” her role as a lawyer that she was never able to carry out her duties to her clients or the courts.

If that’s the case - if people charged with serious offences were not truly defended by their lawyer – then it’s as if Lawyer X’s clients were never tried for their crimes at all.

The best-case scenario is that the clients of Lawyer X will be retried and, perhaps, convicted again.

But then there’s the question of whether future courts will be able or willing to unscramble the Lawyer X omelette – especially more than a decade down the track. It’s easy to give the clients new lawyers, but it’s harder to make the events of the past disappear. Memories will be lost or changed, and the events of the earlier flawed trials will inevitably influence the course and perhaps the result of any later trial.

The worst-case scenario – but a likely one – is that people widely reviled as criminals will (unless they are serving time for other crimes) be released from prison and even be compensated for their time in prison.

The real scandal isn’t that Lawyer X is a bad lawyer, or even that the cops may have done the wrong thing. It’s that the trials that aimed to do justice to defendants, to victims and to society – costly trials, where many people’s lives, freedom, reputation and recovery were at stake – were not fair trials.

Bad and even unfair trials do happen, of course, but what’s different this time is just how unfair these trials were. Lawyer X and the police didn’t just break some rules. They broke a key part of the justice system.