BOISE, IDAHO | By KEITH RIDLER (AP) — Idaho Gov. Brad Little has signed into law legislation that would outlaw nearly all abortions in conservative Idaho by banning them once a fetal heartbeat can be detected.

The governor on Tuesday signed the bill that contains a “trigger provision,” meaning it won’t go into effect unless a federal appeals court somewhere in the country upholds similar legislation from another state.

The measure makes providing an abortion to a woman whose embryo has detectible cardiac activity punishable by up to five years in prison.

It would also allow the woman who receives the abortion to sue the provider. The bill has exceptions for rape, incest or medical emergency.