TALLAHASSEE, Fla. (AP) — 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 a similar waiting period and other important decisions like getting married, getting divorced and buying a gun have longer waiting periods.

She said 24 hours is the minimum amount of time to let a woman think over the decision after consulting with a doctor.

Former governor and current U.S. Sen. Rick Scott signed the bill into law in 2015 and it was immediately challenged.