Mr Justice Peel made the ruling in relation to a child named D despite the history of serious domestic abuse.