Abortion rights advocates filed a lawsuit in an Iowa district court Tuesday seeking to block Iowa’s newest abortion law — known as “the heartbeat bill” — which bans most abortions at about the sixth week of pregnancy, before many women know they are pregnant. The law is among the most restrictive abortion bans in the country.

The Iowa law is part of a flurry of legislation that aims to test the legality of abortion restrictions, as some Republicans want legal challenges to the laws to reach the U.S. Supreme Court in an effort to overturn its landmark 1973 Roe v. Wade ruling. In Mississippi this year, GOP lawmakers passed a 15-week abortion ban that was signed by Mississippi’s Republican governor, but the law was quickly put on hold after a court challenge.

Iowa’s “heartbeat bill” was passed by the Iowa House, 51 to 46, and the state Senate passed the bill 29 to 17 in early May, sending it to Gov. Kim Reynolds (R), who has said abortion is “equivalent to murder.” The law would ban abortions as soon as embryonic cardiac activity is detected, which is usually at about six weeks, the same time women typically begin to feel the first signs of pregnancy.

State Rep. Shannon Lundgren (R), while speaking on the House floor, called the bill “a courageous step” that sends the message that Iowa “will defend its most vulnerable, those without a voice — our unborn children.”

The ACLU of Iowa, the Planned Parenthood Federation of America and the Emma Goldman Clinic of Iowa City are plaintiffs in the lawsuit challenging Iowa’s ban; the case was filed in Polk County District Court.

Almost immediately after the lawsuit was filed, the state’s attorney general said he would not defend the new law. Democrat Tom Miller said he based his decision on a belief that the measure “would undermine rights and protections for women,” the Associated Press reported.

Unless blocked, the Iowa law would go into effect July 1.

The lawsuit names Reynolds and the Iowa Board of Medicine as defendants. Reynolds signed Iowa’s ban earlier this month and said at a public event in Davenport that she felt “very confident in moving forward with it.”

If the ban takes effect, Iowa women would have to travel out of state to obtain an abortion after a fetal heartbeat is detected. Abortion rights advocates say those who don’t have the resources to leave Iowa will be forced to carry an unwanted pregnancy to term, or in some cases will attempt to self-induce, a sometimes-dangerous act.

“This abortion ban is beyond extreme,” said Rita Bettis, legal director of the ACLU of Iowa. “With it, Iowa politicians have tried to ban virtually all abortions for women in our state. In the 45 years since Roe, no federal or state court has upheld such a dangerous law.”

Jill Meadows, medical director of Planned Parenthood of the Heartland and a co-plaintiff in the lawsuit, said it is important that the law not go into effect: “Abortion care must remain safe and legal as an important part of basic reproductive health care.”

The law allows for some exceptions, including in the case of a “medical emergency,” such as conditions that are life-threatening or pose “a serious risk of substantial and irreversible impairment of a major bodily function.” There is an exception for rape and incest, which requires women to report the crime to law enforcement or certain medical professionals within 45 days.

Doctors who violate the law would lose their licenses. The law does not allow a woman to access an abortion because of “psychological conditions, emotional conditions, familial conditions, or the woman’s age.”

Francine Thompson, co-director of the Emma Goldman Clinic in Iowa City, said the law would have a devastating impact on the women her clinic sees every day.

“The cutoff period of this bill at around six weeks simply does not work for women. The timing essentially makes it an almost-complete ban on abortions in our state,” Thompson said in a written statement. “It’s also important to note that the exceptions in the law are essentially non-exceptions. The requirement of reporting rape within 45 days, for example, is completely out of touch with the reality that survivors of those horrendous crimes live with.”