DUBLIN (AP) — 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.

Until now, Ireland's only legislation on abortion was a handed-down British law from 1867, outlawing the practice with a maximum penalty of life imprisonment. The new maximum sentence is 14 years.