Sitting onstage in front of a crowd of 2,000 evangelical Christians, Gov. Kim Reynolds signed a law Friday immediately banning the vast majority of abortions in Iowa.

The law, which took effect immediately, prohibits nearly all abortions after doctors detect cardiac activity in the embryo, which can occur about six weeks into a pregnancy. There are narrowly defined exceptions for rape, incest, fatal fetal abnormalities, and cases of medical emergency.

Reynolds, a Republican, signed the law at the Family Leadership Summit, a gathering of conservative Christians that featured remarks by a half-dozen Republican presidential candidates.

The Iowa Legislature passed the law in a marathon daylong special legislative session on Tuesday, which drew massive protests and heckling from the galleries as lawmakers voted around 11 p.m.

Although a few Republican lawmakers voted against the measure, the GOP was largely united in supporting the law, while Democrats were universally opposed.

The new law takes effect more than five years after Reynolds signed a nearly identical law in 2018 that was permanently blocked by the courts.

Reynolds tried unsuccessfully to revive it after state and federal court decisions last year rolled back protections for abortion, but last month, the Iowa Supreme Court deadlocked 3-3, leaving the law blocked.

Following the court defeat, Reynolds quickly called the special session and urged lawmakers to act again to restrict abortion.

The new law is already facing a lawsuit from abortion providers and could see a protracted legal battle. A Polk County district court judge heard arguments Friday afternoon about whether the law should be temporarily blocked while the challenge plays out.

Republicans hope the courts will rule that abortion does not merit special constitutional protections and allow the law to take effect.