A High Court judge has ruled that a "gravely ill" baby should have a blood transfusion, even though his mother does not consent on religious grounds.
Cardiff and Vale University Health Board asked the court for permission to carry out the procedure and said a decision was needed urgently.
Mr Justice MacDonald said a transfusion was in the three-week-old boy's best interests.
The baby's mother is a Jehovah's Witness and opposes the procedure.
The judge made the ruling at a private hearing in the Family Division of the High Court in London more than a week ago, a decision that has now been published online.
The judge said evidence showed that the boy, who cannot be named for legal reasons, might die if he did not have the transfusion.
Jehovah's Witnesses traditionally object to blood transfusions and treatment with blood products.
The religion's website says: "Both the Old and New Testaments clearly command us to abstain from blood.
"God views blood as representing life. So we avoid taking blood not only in obedience to God, but also out of respect for him as the giver of life."