A baby at risk of becoming the victim of an honour killing because she was born as the result of her unmarried Muslim mother's secret affair must be adopted to keep her safe, the Court of Appeal ruled on Wednesday.
Three senior judges rejected a bid by the one-year-old girl's natural father to have her live with him and his wife.
The child's natural mother is in favour of adoption so that her own family will not find out about the birth.
Lord Justice Munby, Lady Justice Black and Lord Justice Kitchin said in a joint judgment the case involved exceptionally difficult adoption proceedings, the Press Association reported.
The judges imposed unusually wide reporting restrictions banning the publication of all names and locations linked to the case because of the continuing dangers faced by mother and child.
The appeal court rejected an appeal by the father F against a decision last July refusing him a residence order allowing the baby to live with him.
The judge ordered that baby Q should be adopted by a couple, also Muslim, from the same country as the mother, but from a different community.
She found there would be a very significant risk of two and two being put together if the child went to the father because Q was quite obviously not the child of his wife, who had a child of her own.
If the child's maternal grandfather found out about the affair it would be a matter of intense almost unimaginable shame to him and his family, said the judge.
The appeal court said on Wednesday: It was plainly the judge's view that this might provoke action to preserve the family's honour.
The mother had consented to the adoption by the couple, who had been looking after her since December 2010.
The appeal judges said Baby Q was conceived in a relationship which was unacceptable to M's traditional Muslim family and conducted in secrecy.
Both the unmarried mother and her lover were from abroad and moved to the UK in the last 10 years. Although both Muslim, there was a profound cultural difference between them.
When M realised she might be pregnant she ran away from home. She was terrified over how her family would react.
As soon as Q was born, she gave her daughter up for adoption because she genuinely feared for Q's safety should (her father) become aware of, or forced to acknowledge, her existence.
Q's grandmother had told the police that, if her husband found out about the child, he would consider himself honour-bound to kill the child, the mother, the grandmother herself and the grandmother's other children.
Upholding Mrs Justice Parker's decision to make an adoption order, the appeal judges said: The mother's evidence, supported as it was by her actions, and the evidence of (the father) and an experienced police officer, drove the judge to conclude that refusal of the order would carry with it a significant risk of physical harm.
In our judgment this conclusion cannot be criticised.
The adopting couple were Muslims who had taken advice from their imam that they could adopt Q.