Ireland’s head of state has signed the country’s first bill on abortion into law, legalizing the practice in exceptional cases where doctors deem a woman’s life at risk.

President Michael D. Higgins surprised some analysts Tuesday by signing the Protection of Life During Pregnancy Bill rather than referring it to Ireland’s Supreme Court to determine its constitutionality.

The new law does amend the constitution’s ban on abortion, so anti-abortion activists are likely to pursue a Supreme Court challenge.

The law permits abortions to alleviate life-threatening conditions, including a woman’s own threat to commit suicide if refused a termination.