TALLAHASSEE, Florida — Women will have to wait 24 hours before getting an abortion under a ruling by a Florida judge in a nearly seven-year battle over the waiting period.

Circuit Judge Angela Dempsey in Tallahassee tossed out a lawsuit filed on behalf of a Gainesville women’s clinic, saying other medical procedures have similar waiting periods and other important decisions like getting married, getting divorced and buying a gun have longer waiting periods.

“Twenty-four hours is the minimum time needed to sleep on such an important decision,” Dempsey wrote.

The waiting period goes into effect once Dempsey signs one additional piece of paperwork.

Dempsey also added that exceptions for the life of a mother, documented cases of rape and incest, and victims of domestic violence and human traffic support the constitutionality of the law.

The Florida Conference of Catholic Bishops praised the decision.

“The 24-hour reflection period is a reasonable measure that will empower women to make truly informed, deliberate decisions apart from the abortion industry’s pressures,” Christie Arnold, the organization’s lobbyist, said in a news release.

The ruling comes a month after the Florida Legislature sent Republican Gov. Ron DeSantis a bill banning abortion after 15 weeks. DeSantis is expected to sign it.

“Since the passage of this law, Florida politicians have continued to place hurdles in the path of people seeking abortion care as part of a larger effort to push care out of reach,” said American Civil Liberties Union lawyer Julia Kaye. “The state legislature took its most extreme step yet in attacking reproductive freedom earlier last month.”

The ACLU is evaluating its next steps in the legal battle.

Former governor and current U.S. Sen. Rick Scott signed the bill into law in June 2015. The ACLU of Florida and the Center for Reproductive Rights filed the suit the next day on behalf of the Bread and Roses Women’s Health Center in Gainesville.

The lawsuit argued that many women will have a difficult time scheduling appointments on two consecutive days because of work or school schedules, child care availability and the need to travel, especially if they have a low income.

It also said the exceptions in the law such as rape and incest are meaningless because they require documentation and the majority of victims do not report such crimes. The creation of a two-day process also increases the chances that a woman’s abuser will discover the pregnancy and force her to not have the abortion, the lawsuit said.

The lawsuit has been dragged out for nearly seven years. A trial court initially threw it out without a full trial, finding it unconstitutional. In a 2-1 ruling, the 1st District Court of Appeal sent the lawsuit back to the circuit court, saying the state had built evidence that supports the constitutionality of the law. The court also lifted an injunction that was temporarily blocking the law from taking effect during legal proceedings.

The state Supreme Court quickly put the injunction back in place while the case continued.

An abortion clinic in Jacksonville began implementing the 24-hour waiting period last week in anticipation of the judge’s ruling. Amber Gavin, head of advocacy and operations at A Woman’s Choice, said the clinic didn’t want patients to suddenly have to change travel plans to quickly adhere to the law.

“This is incredibly hard on some of them. They come to us and have already taken the day off from work, arranged child care,” she said. “Some of them had not realized this was going to happen, so it’s really painful and hard for our staff to tell the patient that the state is mandating this.”

Gavin said it will also require more staffing hours, and for physicians to be at the clinic longer than before.

Associated Press writer Adriana Gomez Licon in Miami contributed to this report.