Queensland’s controversial ban on puberty blockers for transgender patients has been overturned by the supreme court.

On Tuesday, Justice Peter Callaghan ruled in favour of a challenge by the parent of a transgender child, judging that the directive establishing the ban was made improperly and is unlawful.

He ruled that the health director-general, David Rosengren, failed to properly consult with the executives of the state’s hospitals and health services, as required under the state law.

Callaghan ruled none of the individuals consulted knew about the contents of the directive until the meeting. He ruled the meeting was “functionally irrelevant”, that the decision had already been made, and there were few changes only to the “syntax” of the document as a result of the consultation.

“Adjustments of this nature could not be thought to bear at all on the actual decision – already made – to suspend hormone treatment,” he said.

“The process of consultation required by … [the act] to be observed in the making of the decision was not observed.”

Sign up: AU Breaking News email

The applicant challenged the decision on three grounds, including that Rosengren was improperly influenced by a cabinet decision, alleging that he’d been influenced by “political interference”.

“The application will be allowed on ground three (lack of consultation). It would have succeeded also on grounds one and two, although the questions raised under those headings are more difficult,” Callaghan said, in the judgment.

Guardian Australia exclusively revealed that Rosengren consulted with the executives for less than half an hour in a Microsoft Teams meeting, at the same time as the health minister, Tim Nicholls, held a press conference announcing the decision, at 10am on 28 January.

Callaghan’s ruling means that the Queensland Children’s Gender Service, based at the Queensland Children’s hospital, can again take new patients.

The ban, which only applied to transgender children, was widely condemned by health authorities. The federal sex discrimination commissioner, Anna Cody, described the decision as “harmful” and “discriminatory”.

An independent review of the state’s gender health system last year found the service provided “effective care from referral to discharge” and recommended doubling its funding. The state government did not do so.

The ban immediately affected 491 children on the service waiting list by preventing them from being accepted as patients. Its 547 existing patients continued to receive healthcare despite the directive.

skip past newsletter promotion

Sign up to Breaking News Australia

Get the most important news as it breaks

Privacy Notice: Newsletters may contain information about charities, online ads, and content funded by outside parties. If you do not have an account, we will create a guest account for you on theguardian.com to send you this newsletter. You can complete full registration at any time. For more information about how we use your data see our Privacy Policy. We use Google reCaptcha to protect our website and the Google Privacy Policy and Terms of Service apply.

The judge noted that neither the minister nor Rosengren gave evidence in the case and much of the sequence of events surrounding the decision-making had to be “gleaned” from the accounts of others, or secondary sources such as emails. Much of the case was also covered by cabinet secrecy.

Callaghan said the applicant also might have won on other grounds, that Rosengren was improperly influenced by a cabinet decision, judging that he’d been influenced by “political interference”.

“It must be considered more probably than not that the directive was issued at the direction of the minister who ‘on behalf of the government’ announced its effect,” he ruled.

But he said it was hard to be critical of decision-makers given the “problematic legal terrain”.

The case was a judicial review of the directive – a challenge of its process, not its merits – which means there can be no damages awarded by the supreme court.

A separate challenge against the decision on anti-discrimination grounds is before the Queensland civil and administrative tribunal.