"While it is a matter of grave concern to leave any child in the home of a convicted sex offender, I have accepted the expert evidence that while there is a low risk of harm if Pipah stays in that home, there is a high risk of harm if she were removed," Justice Thackray wrote.

"I have also taken into account the measures that can be put in place to ensure Pipah is kept safe.

"It must be stressed that there were only two options. I have chosen the one least unsatisfactory for Pipah, whose best interests are the paramount consideration."