ST. LOUIS — Missouri's lone abortion clinic can still operate after a St. Louis judge on Friday kept an injunction in effect allowing it to perform the procedure.

In the latest legal whiplash in the case, Planned Parenthood of the St. Louis Region was told minutes before a long-awaited court hearing began that the state health department had dealt it a blow, declining to renew its license.

But State Circuit Court Judge Michael Stelzer ruled in favor of the embattled health center, preventing Missouri from becoming the only state in the country without an abortion clinic — temporarily, at least.

"Today is a victory for women to be able to access the kind of medical care that they and their health professionals need and deserve," said M'Evie Mead, director of policy and organizing at Planned Parenthood Advocates in Missouri, which supports the two Planned Parenthood providers in the state, including one that no longer performs abortions.

"It is still very, very difficult to access abortion in Missouri because of medically unnecessary hoops and regulations, but you can still come to Planned Parenthood today for all of your reproductive health care," Mead said. "And that is a good day for women."

Missouri's health department first decided not to renew the health center's abortion license as of June 1 after an inspection in March found problems, including “at least one incident in which patient safety was gravely compromised,” “failed surgical abortions in which women remained pregnant,” and an alleged failure to obtain “informed consent,” the Associated Press reported.

Stelzer granted a preliminary injunction to the clinic on June 10 that allowed it to continue to operate even as the Missouri Department of Health and Senior Services refused to renew its license. He set a deadline of June 21 for the department to make a decision.

Then, despite the health department not renewing the license, Stelzer said on Friday during a hearing that barely lasted five minutes that his previously issued injunction held.

The long-term fate of the clinic remains unclear. Stelzer said he would issue a written order regarding next steps with the injunction as soon as possible, adding it "won't necessarily come today."

Planned Parenthood has argued that the licensing battle is part of a greater anti-abortion effort by the state's administration. Last month, Missouri's Republican Gov. Mike Parson signed a bill banning abortions on or beyond the eighth week of pregnancy without exceptions in cases of rape or incest — one of the nation's most restrictive abortion bills.

The clinic also says it made changes in response to the state's inspection and has consistently provided high-quality care.

Its legal battle got even thornier this week when Planned Parenthood of the St. Louis Region announced it would no longer be complying with a rule from regulators mandating pelvic exams 72 hours before an abortion as well as on the day of the procedure, calling it another medically unnecessary requirement that the state was putting on it to whittle down Missouri residents' access to abortion.

That stance is backed by the American College of Obstetricians and Gynecologists, which calls multiple pelvic exams for women seeking abortion "unwarranted."

Missouri is one of six states that has only one abortion clinic. The other five states are Kentucky, Mississippi, North Dakota, South Dakota and West Virginia, according to the Guttmacher Institute, a research organization that supports abortion rights.

Missouri had more abortion clinics in the past; in 2008, there were five. But in the past decade, the clinics were unable to keep up with the state's stringent and perpetually evolving requirements, with some closing and then reopening again and then shuttering for good.

The licensing fight comes amid a slew of recent anti-abortion legislation across the country, including a near-total ban on abortions in Alabama. Organizations such as the American Civil Liberties Union are suing to block the bans, which they say are unconstitutional under the 1973 Supreme Court Roe v. Wade decision that federally legalized abortion.

Aaron Mermelstein reported from St. Louis, and Elizabeth Chuck from New York.