LITTLE ROCK (AP) — An Arkansas law banning most abortions 12 weeks into a woman’s pregnancy won’t take effect while a legal challenge is pending, a federal judge ruled Friday.

U.S. District Judge Susan Webber Wright granted a request for a preliminary injunction against the ban, which was set to take effect in August.

The state’s Republican-led Legislature overrode a veto from Democratic Gov. Mike Beebe to enact the law in March. Weeks later, attorneys for the American Civil Liberties Union of Arkansas and the Center for Reproductive Rights sued the state on behalf of two Little Rock abortion providers and sought an injunction to block the ban’s enforcement.

Those groups also want Wright to block the law permanently, saying it’s unconstitutional and clearly contradicts the U.S. Supreme Court’s landmark 1973 Roe v. Wade decision, which legalized abortion until a fetus could viably survive outside the womb. A fetus is generally considered viable at 22 to 24 weeks.

Wright didn’t decide Friday whether Arkansas’ ban was constitutional; she is expected to do that sometime in the future. Her decision Friday was merely a temporary one: It means the law can’t be enforced while the lawsuit is pending.

Arkansas’ 12-week ban was briefly the nation’s most restrictive abortion law, but North Dakota has since passed an even tighter restriction — as early as six weeks.

Abortion rights advocates are expected to challenge the North Dakota law soon. So far, they haven’t challenged Arkansas’ 20-week abortion ban, which took effect immediately after lawmakers overrode Beebe to pass it in late February. That ban is based on the disputed claim that a fetus can feel pain by the 20th week and therefore deserves protection from abortion.

Arkansas’ 12-week law is tied to the date when a fetal heartbeat can typically be detected by an abdominal ultrasound. The measure includes exemptions for rape, incest, the life of the mother and highly lethal fetal disorders. The 20-week ban includes the same exemptions as the 12-week one, except for fetal disorders.

The lawsuit at issue Friday, which was filed on behalf of Dr. Louis Jerry Edwards and Dr. Tom Tvedten, names members of the Arkansas State Medical Board as defendants because the board is responsible for licensing medical professionals.

Wright on Friday sided with lawyers for the groups who argued that the ban could harm the doctors and their patients.

“I believe that there is a threat of irreparable harm, because these doctors ... could face loss of their licenses,” she said Friday. “... They also have established that their patients could suffer irreparable harm by not being able to have abortions post 12-weeks but during that pre-viability period.”

However, Wright said she believes parts of the law may not pose an undue burden to a woman’s right to have an abortion.

“I do not believe it would be an undue burden on a woman’s right to have an abortion for the doctor to determine whether she has a fetal heartbeat and to tell her when she does,” Wright said, referring to another part of the law.

“This law is an extreme and dangerous intrusion by politicians into what is the most intimate, personal medical decision a woman and her family and her doctor can make,” ALCU’s Talcott Camp said outside the federal courthouse in Little Rock.

Republican state Sen. Jason Rapert stood a few feet away. A lead sponsor of the 12-week abortion ban, Rapert expressed a very different view.

“When there is a heartbeat, there is life,” Rapert said. “And it is time in this nation and in our state, when you have 55 million human beings that have been taken, we must have a more rational and a more humane policy on abortion in our nation.”