CLAYTON, Mo. (AP) — A Missouri judge on Wednesday temporarily halted a first-of-its-kind rule restricting access to gender-affirming health care for transgender kids and adults, just hours before it was set to take effect.

St. Louis County Circuit Judge Ellen Ribaudo put Republican Attorney General Andrew Bailey’s emergency rule on transgender health care on hold until at least Monday.

Bailey has touted the rule as a way to shield minors from what he describes as experimental medical treatments, though puberty blockers and sex hormones have been prescribed for decades. The restrictions also apply to health care for adults.

Transgender Missourians and health care providers sued to stop it from taking effect as scheduled Thursday. They argued that Bailey sidestepped the GOP-led Legislature and acted beyond his authority in attempting to regulate gender-affirming health care under the state’s consumer-protection laws.

Their attorney, Tony Rothert with the American Civil Liberties Union of Missouri, told Ribaudo at a court hearing Wednesday that the regulations "will cause immediate, severe and potentially irreparable harm” for people who could lose access to medications that include puberty blockers and sex hormones.

He and other attorneys said that transgender people who can’t get gender-affirming care are at risk of suicide.

They asked for a delay of up to 30 days while Ribaudo considers the case. But Ribaudo said she needed more time to decide whether to issue such a temporary restraining order and instead stayed the implementation of Bailey's order until 5 p.m. Monday.

Assistant Attorney General Joshua Divine argued that Bailey’s order does not ban gender-affirming care.

The rule will require people to have experienced an “intense pattern” of documented gender dysphoria for three years and to have received at least 15 hourly sessions with a therapist over at least 18 months before receiving puberty blockers, hormones, surgery or other treatment. Patients also must first be screened for autism and “social media addiction,” and any psychiatric symptoms from mental health issues would have to be treated and resolved.

Some people would be able to maintain their prescriptions while undergoing required assessments.

Divine said the rule provides “basic procedural guardrails.” He cited studies showing that a high percentage of kids seeking to transition are dealing with mental health issues. He said that rather than transition they should undergo “talk therapy.”

Those suing argue Bailey sidestepped the GOP-led Legislature and acted beyond his authority in attempting to regulate gender-affirming health care under the state’s consumer-protection laws.

“We don’t allow attorneys general to legislate, and we don’t allow them to play doctor,” Rothert said.

Bailey issued the restrictions following an investigation he launched in February into the Washington University Transgender Center at St. Louis Children’s Hospital. The investigation was prompted by a former employee who alleged the center was providing children with gender-affirming care without informed consent, not enough individualized case review and wraparound mental health services. An internal review by the university found no misconduct and determined that the former employee's claims were unsubstantiated.

Bailey’s efforts to crack down on gender-affirming health care come as Republican lawmakers across the country have proposed hundreds of laws aimed at transgender people. At least 13 states have enacted laws restricting or banning gender-affirming care for minors.

The Food and Drug Administration approved puberty blockers 30 years ago to treat children with precocious puberty — a condition that causes sexual development to begin much earlier than usual. Sex hormones — synthetic forms of estrogen and testosterone — were approved decades ago to treat hormone disorders or as birth control pills.

The FDA has not approved the medications specifically to treat gender-questioning youth. But they have been used for many years for that purpose “off label,” a common and accepted practice for many medical conditions. Doctors who treat transgender patients say those decades of use mean the treatments are not experimental.

Critics have raised concerns about children changing their minds. Yet the evidence suggests detransitioning is not as common as opponents of transgender medical treatment for youth contend, though few studies exist.