Kentucky governor Matt Bevin on Tuesday signed a bill that bans abortions chosen on the basis of an unborn child’s sex, race, or disability.

A court filing in the U.S. District Court in Louisville indicated that the governor has signed the bill, which included an “emergency clause” stipulating that it would go into effect immediately.

Physicians must now certify in writing that the patient did not request the abortion for a reason related to the baby’s sex, race, or disabilities. Flouting the new law puts doctors at risk of losing their medical license or being prosecuted for a felony, although the mother of the unborn child would not be targeted.

The American Civil Liberties Union is challenging the bill in federal court as an unconstitutional restriction on a woman’s right to abortion.

“Instituting laws that instantly affect critical patient care should not be a cat-and-mouse game,” the group said, asking that it be notified when the bill is signed.

Another new law that bans abortions after about six weeks or when a heartbeat can be detected forced Kentucky’s sole abortion clinic, EMW Women’s Surgical Center in Louisville, to cancel some appointments on Friday until a federal judge intervened.

“EMW and its abortionists have responded with a novel claim: Women have a constitutional right to undergo race-based abortions, gender-based abortions, and disability-based abortions. In plaintiffs’ view, somewhere in the Fourteenth Amendment’s penumbra lies a protection for eugenics,” the governor’s lawyer M. Stephen Pitt wrote in defending the ban on eugenics-based abortions. “This is a perverse distortion of Roe v. Wade.”