The Victorian government has called a royal commission into a police misconduct scandal that has potentially jeopardised at least 22 convictions including that of underworld figure Tony Mokbel.

Some of the most notorious criminals in Australia received letters on Monday telling them that their lawyer had acted as a police informant in what the high court has described as an “atrocious” case of police misconduct that undermined the integrity of the justice system.

Mokbel, who was jailed for 22 years in 2012 for drug trafficking, is among those who could be making a bid for freedom following revelations their lawyer was passing information on to Victoria police between 2005 and 2009, in breach of client confidentiality.

Victoria police and the lawyer involved have been trying for three years to prevent the disclosure of the informant’s identity to their underworld clients, with police arguing in court that if the information were disclosed “the risk of death [to the lawyer] would become ‘almost certain’”.

But the supreme court of Victoria, the court of appeal, and the high court have all ruled against the push for continued secrecy, saying the public interest in maintaining the integrity of the justice system outweighed concerns for the lawyer’s safety.

Most of the suppression orders that prevented reporting of the case were lifted at 9am Monday.

Five hours later, premier Daniel Andrews called a royal commission into the scandal, saying it would determine how many criminal convictions were directly affected by the use of the lawyer as an informant.

It would also determine what changes needed to be made to the management of informants by Victoria police to prevent similar misconduct in future; and to determine the impact of the misconduct on criminal convictions and possible compensation claims.

Andrews said the royal commission would be given a budget of $7.5m and begin work early in the new year, with an interim report outlining the number of convictions directly impacted due on 1 July 2019 and a final report due on 1 December 2019.

He said the commissioner would be appointed and the terms of reference set in the next few weeks.

Police chief Graham Ashton defended using the informant and the decision to challenge the release of this information through the courts. But he said Victoria police acknowledged the high court’s decision and would comply fully with the royal commission.

He said the actions of police should be put into the context of the so-called gangland wars, “a desperate and dangerous time” where “a genuine sense of urgency was enveloping the criminal justice system, including police.”

“I believe the officers both current and veteran who managed the informer and worked on these investigations acted in good faith and they can continue to have my support,” Ashton told reporters. “Should at some future time a royal commission find otherwise we will address those issues then.”

Ashton said police were motivated by the need to protect the lawyer and their family, “who Victoria police believed would be murdered if this information was released”.

Andrews said that the royal commission would be conducted in such a way as to protect the safety of the informant, referred to in court documents as EF, and their family.

“The safety of at least one individual is at risk,” he said.

Andrews said he was briefed on the outcome of the high court decision, which was made on 5 November, the day after he was re-elected premier last month.

The decision, which was published online on Monday, revoked leave for EF and Victoria police to appeal to the high court to overturn a decision of the Victorian court of appeal, which ruled in favour of a bid by the Victorian director of public prosecutions to inform EF’s past clients that they may have grounds to appeal their convictions.

The high court made the unanimous decision because it said that the only argument for not releasing the information was to secure the safety of EF and their family, and that they may be “adequately protected” through witness protection.

It said it hoped that the circumstances of the case would “never be repeated.”

“EF’s actions in purporting to act as counsel for the convicted persons while covertly informing against them were fundamental and appalling breaches of EF’s obligations as counsel to [their] clients and of EF’s duties to the court,” the decision said.

“Likewise, Victoria police were guilty of reprehensible conduct in knowingly encouraging EF to do as [they] did and were involved in sanctioning atrocious breaches of the sworn duty of every police officer to discharge all duties imposed on them faithfully and according to law without favour or affection, malice or ill-will.

“As a result, the prosecution of each convicted person was corrupted in a manner which debased fundamental premises of the criminal justice system. …. the maintenance of the integrity of the criminal justice system demands that the information be disclosed and that the propriety of each convicted person’s conviction be re-examined in light of the information.

“The public interest in preserving EF’s anonymity must be subordinated to the integrity of the criminal justice system.”

Andrews told reporters that he had still had faith Ashton but that a royal commission was necessary to ensure the integrity of the criminal justice system going forward.

“There is some degree of confidence that this is not occurring now and could not be occurring now, but we are not prepared to take everybody’s self assessment and think that’s enough,” he said.

