Updated

Abortion became legal in Ireland on Tuesday in limited cases where the mother's life is at risk, after President Michael D. Higgins signed a law that has exposed deep divisions in the Catholic-majority nation.

Irish lawmakers had overwhelmingly voted through the abortion bill earlier this month, prompted by an outcry over the death last year of an Indian woman who had been refused a termination in an Irish hospital.

"President Higgins has today signed the bill into law," a statement from the president's office confirmed on Tuesday.

Deputy Prime Minister Eamon Gilmore said it was "a historic moment" for the women of Ireland.

"The core purpose of this legislation is about saving women's lives. It is about providing for a very basic human right," he said in a statement.

Ending years of uncertainty over the legal status of abortion in Ireland, the Protection of Life During Pregnancy Act permits the termination of a pregnancy if doctors certify there is a real and substantial risk to the life of the mother.

It follows a ruling by the European Court of Human Rights in 2010 that found Ireland had failed to properly implement the constitutional right to abortion where a woman's life is at risk.

Under a 1992 Supreme Court ruling, women in Ireland are also legally entitled to an abortion if it is needed to save a mother's life -- but six successive governments had failed to introduce legislation to reflect this.

The death of 31-year-old Savita Halappanavar in a Galway hospital last October placed Ireland's restrictive abortion laws under global scrutiny and forced the current government to act.

Halappanavar, who was from India, had sought a termination when told she was miscarrying, but the request was refused as her life was not at risk at the time. She died of blood poisoning days later.

In a sign of the rifts that remain on abortion in predominantly Catholic Ireland, tens of thousands of people protested both in favour of and against a change in the law following Halappanavar's death.

The lower house of the Irish parliament passed the legislation with 127 votes in favour and 31 against earlier this month. It passed through the upper house last week.

But seven lawmakers including a junior minister were expelled from Prime Minister Enda Kenny's Fine Gael party for voting against the legislation.

Lucinda Creighton, junior minister with responsibility for European affairs, quit her cabinet post after voting against the bill over her concerns that a woman deemed suicidal will be allowed a termination.

The new act permits an abortion if an obstetrician and two psychiatrists unanimously agree that an expectant mother is a suicide risk, in a clause that deeply divided opinion.

Anti-abortion groups are widely expected to challenge aspects of the new law through the courts.

"For the first time in our history, it is now legal to deliberately target the life of an innocent human being," said Caroline Simons of the Pro-Life Campaign.

"The Pro Life Campaign will now devote its energies to the repeal of this unjust law."

Some pro-choice campaigners say the law does not go far enough and will not stop the flow of women travelling from Ireland to Britain for terminations.

Almost 4,000 women travelled from Ireland to England or Wales for abortions last year, according to the British health ministry.