The High Court has cleared the way for life support treatment to be withdrawn from a pregnant woman in her twenties who was declared brain dead more than three weeks ago.
Her family had asked the court to allow the treatment to be stopped after doctors said they were unsure about the legal position of the unborn child under the Constitution.
The court found keeping the woman on life support would be a futile exercise as there was no realistic prospect of the baby being born alive.
The decision will not be appealed.
The woman was declared brain dead in hospital on 3 December after suffering a brain injury.
She was 15 weeks' pregnant at the time.
The key question in the case, the judges ruled, was whether there was any realistic prospect of the child being born alive if life support was maintained.
The court found there was no realistic prospect of this.
It found the mother's body was breaking down and overwhelming infection from various sources would bring the life of the unborn to an end before there was any opportunity for a viable delivery of a live child.
The court found a necessary part of vindicating the right to life of the unborn was to enquire as to the practicality and utility of continuing life support measures.
It found the unborn child in this case had suffered the dreadful fate of being present in the womb of a mother who had died and in which the environment was not safe or stable and was failing at an alarming rate.
The court found the 18 week old, unborn child in this case was facing into a perfect storm from which it had no realistic prospect of emerging alive.
It had nothing but distress and death in prospect.
It ruled continuing the life support would deprive the woman of dignity in death and subject her father, partner and young children to unimaginable distress in a futile exercise and it authorised the withdrawal of life support treatment.
Lawyers for the unborn child said they were satisfied the courts had considered the right to life of the child in great depth and had considered the issues adequately to protect and vindicate that right.
Senior Counsel Conor Dignam said they did not intend to take the matter any further.
The court praised the immense courage and fortitude of the woman's father, partner and family.