PONTIAC, Mich. (AP) — A Michigan judge on Wednesday extended an order that bars county prosecutors from enforcing a 1931 ban on abortion.

Oakland County Judge Jacob Cunningham agreed after lawyers for Gov. Gretchen Whitmer argued that pulling the plug on his Monday order would cause chaos around the state.

READ MORE: Ribs RnB Music Festival Kicks Off This Weekend In Downtown Detroit

“If you need one, you need one today or very, very soon,” Assistant Solicitor General Linus Banghart-Linn said of abortion services. “We don’t want more confusion.”

The restraining order will hold at least until the next hearing on Aug. 17.

Michigan’s decades-old abortion ban makes it a crime to perform abortions unless the life of the mother is in danger.

A Court of Claims judge in May suspended the law in a different lawsuit, saying it’s probably unconstitutional. That step had kept abortion legal in Michigan even after the U.S. Supreme Court overturned Roe v. Wade in June.

But the status became clouded this week when the state appeals court said the decision applied only to the attorney general’s office, not prosecutors in counties where abortion services are provided.

Lawyers for Whitmer, a Democrat who supports abortion rights, rushed to Cunningham’s court for a restraining order, which was granted Monday.

READ MORE: Judge Says Michigan Gov. Whitmer Won't Have To Testify In Abortion Lawsuit

Democratic prosecutors in some of the state’s largest counties, especially in the Detroit area, have pledged to not enforce the 1931 abortion ban. But Republican prosecutors in Kent and Jackson counties have expressed a different position.

David Kallman, an attorney for the two GOP prosecutors, argued against maintaining the restraining order.

“Since when does a governor have the right to go after a law he or she doesn’t like?” Kallman said. “Just come to court and just say, ‘Hey, I might be harmed by this so I want this law overturned or I want it changed.’ That’s ridiculous.”

Cunningham declined to allow attorney John Bursch to argue on behalf of Right to Life of Michigan and the Michigan Catholic Conference.

The judge said the anti-abortion groups aren’t formal parties in the litigation.

Separately, voters in November will likely get an opportunity to decide whether to add abortion rights to the state constitution and trump the old law.

MORE NEWS: MDHHS Lifts No-Contact Recommendation In Huron River Chemical Spill

© 2022 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.