A travel ban preventing a two-year-old thought to be at risk of female genital mutilation (FGM) has been relaxed.
The High Court previously ruled the girl must stay in the UK until she turned 16.
After an appeal, the same court said the toddler's mother, a British Muslim, could be allowed to take her to Egypt to see her father.
Mr Justice Cobb imposed strict limits on where she can go and how long she can stay.
The girl's mother is married to an Egyptian man who is not allowed to travel to Britain.
In November 2017, Ms Justice Russell banned the woman from taking her daughter abroad after Hertfordshire County Council social services staff raised concerns about the risk of FGM.
She said the risk was "so great" that a travel ban had to be imposed.
Appeal judges said that decision should be reviewed and Mr Justice Cobb reconsidered the evidence.
He said he could not lose sight of the fact that he was guarding the girl against a "heinous form of criminal ill-treatment".
But he said was satisfied that sufficient safeguards could be put in place to allow her to make a "short, and carefully managed" trip.
The judge ordered the trip to last for no more than a week, and said it must take place in term-time so the girl can return to nursery in the UK and be seen by professionals.
He permitted the child to spend time with her father in a tourist resort on the Red Sea coast, but not travel outside that location.
She is also forbidden to meet her "wider paternal family".
Court staff, who already hold the girl's passport, will not release it to the girl's maternal grandfather until 48 hours before the flight.
Upon her return to the UK, the passport must be returned to the court within 48 hours, the judge said.
Female genital mutilation is illegal in the UK and it is compulsory for family doctors, hospitals and mental health trusts to report any new cases in their patients.
The practice - intentionally altering or injuring the female external genitalia for non-medical reasons - carries a sentence of up to 14 years in jail.