LANSING, Mich. (AP) — Gov. Gretchen Whitmer sued Thursday to protect abortion rights, asking a Michigan court to recognize a right to abortion under the state constitution and to overturn a 176-year-old ban in the state that may take effect if the landmark Roe v. Wade ruling is vacated.

The Democratic governor’s preemptive lawsuit, which was filed in Oakland County against prosecutors in 13 counties with an abortion clinic, came as the U.S. Supreme Court’s conservative majority considers allowing states to ban abortion much earlier in pregnancy and potentially overturning the right. Planned Parenthood of Michigan and its chief medical officer filed a similar suit in the state Court of Claims to block enforcement of the 1931 law, which dates to an 1846 ban.

Whitmer, who is up for reelection this year, was expected to request that the Michigan Supreme Court quickly take her case rather than let it wind through lower trial and appellate courts. A favorable decision could enable abortions to continue in Michigan after the federal high court rules.

“It was important for us to take action now, to ensure that women and providers across the state of Michigan know whether abortions will still be available in the state because it impacts their lives and our health care providers’ practices. It’s crucial that we take this action now to secure and ensure that the Michigan Constitution protects this right that we have had available for 49 years,” the governor told The Associated Press, saying nearly 2.2 million women may lose access to a safe, legal medical procedure.

Michigan is among eight states with an unenforced abortion ban that was enacted before the 1973 Roe decision legalized abortion nationwide. States on both sides of the abortion issue have been taking a variety of steps to prepare for Roe being eroded or rescinded, including making it a crime to perform an abortion and banning legal action against people who aid or receive an abortion.

Michigan’s law makes it a felony to use an instrument or administer any substance with the intent “to procure the miscarriage” of a woman unless necessary to preserve her life.

Whitmer wants the Michigan Supreme Court to declare a state constitutional right to abortion and to strike down the 1931 law, which could go back into effect if Roe is overturned or weakened. The lawsuit argues that the law is invalid under the due process and equal protection clauses of the state constitution.

Michigan could soon be left with a near-total ban without even exceptions for rape and incest — “one of the most extreme laws in the country,” Whitmer said. Her call to repeal the law has gone nowhere in the Republican-controlled Legislature.

The state high court has four Democratic and three Republican justices.

Whitmer will ask that the court intervene in part to avoid legal uncertainty when the federal high court issues its ruling on Mississippi’s ban on abortions after 15 weeks of pregnancy.

The complaint says that while the Michigan Supreme Court in 1973 ruled that Roe limited the effect of the state ban, the right to abortion has been undermined over 50 years of litigation in federal courts. The state’s high court has not said whether the state constitution protects the right. The Michigan Court of Appeals, in 1997, ruled there is no state constitutional right to abortion — a reason the Michigan Supreme Court should step in immediately, according to her office.

The lawsuit points to “substantial ambiguity” about what the state ban prohibits.

Abortion rights advocates have launched a ballot drive to enshrine the right to abortion in the state constitution but need about 425,000 voter signatures to put the initiative on the November ballot.

Also Thursday, seven Democratic county prosecutors who were named in the lawsuit pledged to not enforce the anti-abortion law.

“We cannot and will not support criminalizing reproductive freedom or creating unsafe, untenable situations for health care providers and those who seek abortions in our communities,” said the elected prosecutors in Wayne, Oakland, Genesee, Washtenaw, Ingham, Kalamazoo and Marquette counties. “Instead, we will continue to dedicate our limited resources towards the prosecution of serious crimes and the pursuit of justice for all.”

The other six elected prosecutors who were sued are Republicans.