A federal judge on Friday struck down a Wisconsin law requiring doctors performing abortions to get hospital admitting privileges, ruling that any benefits to women's health from the requirement are "substantially outweighed" by restricting women's access to abortion.

U.S. District Judge William Conley, who earlier had put the law on hold, ruled that the 2013 law is unconstitutional. He issued a permanent injunction blocking its enforcement.

Planned Parenthood and Affiliated Medical Services had sued the state, arguing the requirement will force AMS's Milwaukee clinic to close because its doctors can't get admitting privileges.

The groups argued that would amount to restricting access to abortions in Wisconsin. State attorneys contended the mandate would ensure continuity of care for women hospitalized with abortion complications.

In his ruling, Conley wrote that the "marginal benefit to women's health" by requiring hospital admitting privileges "is substantially outweighed by the burden this requirement will have on women's health outcomes due to restricted access to abortions in Wisconsin."

"While the court agrees with the State that sometimes it is necessary to reduce access to insure safety, this is decidedly not one of those instances," Conley wrote. "In particular, the State has failed to meet its burden of demonstrating through credible evidence a link between the admitting privileges requirement and a legitimate health interest."

In a statement, Planned Parenthood and the American Civil Liberties Union noted that only four health centers provide abortions in Wisconsin. If the law took effect, the groups said, the largest of those centers would be forced to close immediately, and the remaining three "will not be able to absorb the unmet need."

"Politicians, not doctors, crafted this law for the sole purpose of shutting down women's health care centers and preventing women from getting safe, legal abortions," ACLU deputy legal director Louise Melling said in the statement.

"We all want to protect patient safety — this law doesn't do that, as the court recognized," said Planned Parenthood of Wisconsin CEO Teri Huyck. "Politicians passed this law in order to make it extremely difficult for women in Wisconsin to get safe and legal abortions, plain and simple."

Laurel Patrick, a spokeswoman for Republican Gov. Scott Walker, said the governor's office would work with the attorney general to appeal the ruling. "We believe the law will ultimately be upheld," She said in an email.

A spokeswoman for Wisconsin Attorney General Brad Schimel did not immediately respond to messages seeking comment.

Conley said at the hearing on the lawsuit that he was worried the law was too rigid. He noted that the law required providers to get privileges within three days of its enactment. Walker signed the law on July 5, 2013, and it required providers to have privileges in place by July 8.

In his ruling, Conley noted that the "sudden adoption" of the permitting requirements, without giving enough time for compliance, "compels a finding that its purpose was to impose a substantial obstacle on women's right to abortions in Wisconsin."

Fourteen states require doctors performing abortions to either have hospital admitting privileges or some sort of alternative agreement, according to the Guttmacher Institute, which supports abortion rights. Five other states have passed such restrictions but courts have put them temporarily on hold.