SALT LAKE CITY, UT - MAY 03: People gather at the state Capitol to rally in support of abortion rights on May 3, 2022 in Salt Lake City, Utah. A leaked draft opinion by Supreme Court Justice Samuel Alito has suggested that the Court is poised to overturn Roe v. Wade, the landmark 1973 ruling that created a constitutional right to abortion.  (Photo by George Frey/Getty Images)
CNN  — 

A Utah judge has blocked the state’s ban on abortion clinics, the day before it was supposed to start taking effect.

The complaint was aimed at House Bill 467, which was signed by Republican Gov. Spencer Cox in March. The law bans abortion clinics from operating in the state beginning next year, but allows abortions to be performed until 18 weeks of pregnancy at a hospital.

Under that law, Utah was scheduled to stop granting licenses for abortion clinics after May 2 and abortion clinics would have been prohibited from operating in the state on or after January 1, 2024, “or the last valid date of an abortion clinic license issued … whichever date is later.”

Third District Judge Andrew Stone agreed with Planned Parenthood Association of Utah that the law was discriminatory against abortion clinics.

“The Clinic Ban places a greater burden on licensed abortion clinics by criminalizing abortions performed in such clinics despite the unrebutted evidence that abortions performed in an outpatient clinic are equally as safe as those performed in a hospital,” Stone wrote. “(Planned Parenthood) has advanced a factual record supporting the conclusion that the Legislature’s classification is unreasonable and appears to single out abortion clinics without any justification.”

In a statement, Alexis McGill Johnson, president and CEO of Planned Parenthood Federation of America, said the organization was “grateful that the court has blocked this extremely harmful law and granted much-needed relief to Utahns in need of abortion care before it took effect.”

CNN has reached out to the governor’s office for comment.