CNN  — 

A federal judge on Friday ordered a preliminary injunction blocking an Arkansas law that would ban abortions after 12 weeks of pregnancy, a court official told CNN on Friday.

The official spoke to CNN on condition of anonymity, citing department policy.

U.S. District Judge Susan Webber Wright in Little Rock, Arkansas, ordered the injunction amid a challenge by the American Civil Liberties Union and other groups.

The measure was set to take effect in August, according to the ACLU.

“We have asked the court to stop this dangerous law from going into effect,” Holly Dickson, legal director of the ACLU of Arkansas, said in a news release Friday. “This law is aimed at allowing politicians to insert themselves into deeply personal and private medical care and decisions for which they should have no say.”

The state’s legislature had passed the measure and then, in March, overrode a veto by Gov. Mike Beebe.

Roe v. Wade, a 1973 decision by the U.S. Supreme Court, legalized the right to an abortion in all 50 states. Statutory time limits on when abortions can take place, however, vary from state to state.

North Dakota recently banned most abortions after six weeks, the most restrictive law in the country.

CNN’s Josh Levs, Ed Payne and Jason Hanna contributed to this report.