After a marathon debate, lawmakers in the Republic of Ireland have voted to allow abortion under certain conditions.
In a 127-31 vote in the Dail, they backed allowing a termination when a woman's life is deemed to be in danger.
The bill was passed early on Friday after two hotly-debated sessions.
The BBC reports the debate revealed deep splits over the issue.
Opponents said the bill - which still needs approval by the upper house of parliament - could lead to more widespread abortion.
Others argue the bill is too limited as it does not allow for terminations in cases of rape or incest, or when there is a foetal abnormality.
Nor does it allow for termination when the foetus cannot survive outside the womb.
Since a Supreme Court ruling in 1992, a credible threat of suicide is constitutionally regarded as grounds for a termination.
But until now, no government has introduced legislation to give doctors legal certainty on when an abortion can be carried out.
The BBC reports the law change was prompted by the case of a woman who died in October 2012 when she was miscarrying, because doctors were not allowed to carry out an abortion.
The Fine Gael-Labour coalition government said the legislation will bring the law and constitution into line.