A St. Louis circuit judge granted Planned Parenthood a restraining order against the state on Friday afternoon, allowing the abortion clinic to continue operating even after Missouri health officials had refused to renew the clinic's license.

Had the license lapsed, the clinic would have been forced to stop providing the procedure, effectively ending legal abortion in the state. Missouri would have become the first state to not have a legal abortion clinic since Roe v. Wade was decided in 1973.

On Friday afternoon St. Louis circuit judge Michael Stelzer wrote "a temporary restraining order is necessary to preserve the status quo and prevent irreparable injury" to Planned Parenthood, which had "demonstrated that Immediate and irreparable injury will result" if the license expired.

"This is a huge victory," said Dr. David Eisenberg, the clinic's medical director, in a press conference on Friday afternoon. "It is my duty to protect and serve the patients that come here no matter what."

In an interview with CBSN, Dr. Leana Wen, the president and CEO of Planned Parenthood Federation of America, said, "We want our patients to know that we will never abandon the women of Missouri."

Wen tweeted after the ruling: "This is a victory for women across Missouri, but this fight is far from over. We have seen just how vulnerable access to abortion care is in Missouri—and in the rest of the country. We'll keep fighting these attempts to end access to healthcare—no matter what."

Planned Parenthood will be back in court on June 4 to ask the court for a preliminary injunction. Missouri Governor Mike Parson said state officials will pursue their case in court.

"Following today's ruling, the State will soon have the opportunity for a prompt legal review of our state health regulators' serious health and safety concerns regarding Planned Parenthood's abortion facility in St. Louis," Parson said in a statement Friday afternoon. "We are committed to and take seriously our duty to ensure that all health facilities in Missouri follow the law, abide by regulations, and protect the safety of patients."

Friday's decision comes after several weeks of back and forth between the clinic at Missouri's state health department. The agency had refused to renew Planned Parenthood's license to perform abortions unless it could complete an investigation into the clinic, including interviews with seven physicians who worked at the clinic.

Planned Parenthood said it could offer interviews only with two who are its employees. The other five physicians working at the facility are residents in training and not employed by Planned Parenthood. The state has indicated that the result of those interviews could be "board review" in addition to "criminal proceedings," a spokesperson for Planned Parenthood said. The medical residents declined to be interviewed for the state's investigation.

In a letter to Planned Parenthood and reviewed by CBS News, the Department of Health wrote that it could not "complete our investigation until it interviews the physicians involved in the care provided in the potential deficient practices," and that "the investigation needs to be completed and any deficiencies resolved before the expiration of [the clinic's] license on May 31, 2019."

Dr. Colleen McNicholas, a Planned Parenthood physician in St. Louis who agreed to be interviewed by the state, said the agency hasn't shared details of the investigation or the potential concerns.

"We are 100 percent committed to the best care that we can provide for patients. So certainly if there is an issue with the care we're providing we want to know about it," she said. "We want to be able to address that. But we can't do that when we're being attacked."