The American Civil Liberties Union on Wednesday asked a federal judge to block an Alabama law that allows a fetus to be represented in court when a minor is seeking judicial permission for an abortion.

While abortion opponents have rolled out a variety of new restrictions on abortion in recent years -- including new requirements on clinics and doctors -- ACLU staff attorney Andrew Beck said the Alabama law was unique.

"This particular law is one of a kind," Beck said.

Alabama minors must have permission from their parents or a judge to have an abortion. Alabama legislators in 2014 changed the judicial permission process to allow a judge, at his or her discretion, to appoint a guardian ad litem "for the interests of the unborn child." The law also requires that local district attorneys are notified of the hearing and can question the minor and call witnesses.

U.S. Magistrate Judge Susan Russ Walker heard arguments on the ACLU request for a preliminary injunction blocking the law and a state request to dismiss the lawsuit. State lawyers argued the law provides options to the judge to obtain information about the minor's maturity level, while the ACLU argued the law forced teens to go through a "trial" to obtain an abortion.

"It puts teens on trial to get a constitutionally protected procedure. It's adversarial. She loses her anonymity because the district attorney or guardian ad litem can call in witnesses and interrogate the child," said Susan Watson, executive director of the American Civil Liberties Union of Alabama.

The ACLU filed the lawsuit in federal court in Montgomery on behalf of Reproductive Health Services, a Montgomery abortion clinic.

Lawyers for the Alabama attorney general's office disputed the ACLU portrayal of the law.

Assistant Attorney General William G. Parker said the decision for judicial permission for abortion still rests on only two factors: whether the teen is mature enough to make the decision and whether an abortion is in her best interest.

Parker told Walker that since 2003, there have been 291 court petitions from minors seeking judicial permission for an abortion. Only 10 were denied, he said.

State lawyers submitted a statement from an assistant district attorney describing how the process has worked in one Alabama county.

Montgomery County Deputy District Attorney Leon Hampton wrote that his office has participated in two hearings since the law was enacted. He said he had limited involvement and only asked one question and that was about the teen's plan for seeking medical care in case of an abortion.

The judge did not appoint anyone to represent the fetus and granted permission for the abortion in both cases, Hampton wrote.

Watson while she was "thrilled" the process worked smoothly in Montgomery, but noted that was one county.

"That was a Montgomery. We don't know what other judges would do. You might get a judge that is not friendly and do a full-blown trial."

Alabama legislators enacted the law in 2014 when considering a slate of other restrictions on abortions.