MONTGOMERY, Ala. — 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.