A judge has dismissed Gov. Matt Bevin’s lawsuit that accused a Louisville Planned Parenthood facility of performing abortions without a license.

Jefferson Circuit Court Judge Mitch Perry ruled that the clinic had received approval from Kentucky’s Cabinet for Health and Family Services days before Bevin took office.

“Based simply on a change in Cabinet personnel, it defies reason that an abortion facility which opened based on the approval of the Cabinet’s [Office of the Inspector General] may be then said to have willfully violated the law by that same Cabinet,” Perry wrote.

In its lawsuit, the Bevin administration alleged that Planned Parenthood’s required documentation of an emergency hospital and ambulance service were “a complete sham.”

Bevin’s office also alleged that Maryellen Mynear, the former inspector general of the Cabinet for Health and Family Services, “ignored or overlooked” the allegedly deficient abortion license application.

Related Story SCOTUS Ruling Opens Door For Challenges To State Abortion Laws

The state said the previous administration erroneously told Planned Parenthood that abortion clinics could begin operations without a license.

In his ruling, Perry wrote that Planned Parenthood of Indiana and Kentucky“communicated consistently” with the state’s Office of the Inspector “before and after the facility began performing medical procedures.”

Perry said that the new administration had “no justification, legal or otherwise” for altering the application.

Planned Parenthood of Indiana and Kentucky said the state gave the organization approval to conduct abortions in emails received on Dec. 3 and Dec. 7, the day before Bevin was sworn in.

The state ordered Planned Parenthood to halt abortion services in late January, one day after the organization announced it had begun providing abortions at the Louisville clinic. Bevin’s administration said that the clinic illegally performed 23 abortions between December 3 and Jan 28.

Amanda Stamper, a spokeswoman for Bevin, said the administration would appeal the decision.

This story has been updated.