A judge has ordered a Christian child placed in a conservative Muslim household to be rehomed with her family, as it is revealed the local authority involved attempted to block journalists from exposing the story.

The five-year-old girl has been taken into the care of her grandmother, as her family had been requesting, and removed from the care arranged by the London borough of Tower Hamlets, The Times reports.

The council, which has been accused in the past of corruption and favoring Muslim interests, attempted to block a journalist from the paper attending the court after they also moved to halt publication of the story last week.

Security staff ordered a The Times journalist out of the court building until Judge Khatun Sapnara, a practicing Muslim, said they could attend, insisting the press had raised “very concerning” matters of “legitimate public interest”.

The judge said the child would be safer with her grandmother who could meet her needs “in terms of ethnicity, culture, and religion”, and ordered the council to conduct an investigation into the case.

The child had been placed with two Muslim families in six months, with the women in both covering their entire faces in public – a sign they are followers of the fundamentalist Salafi or Wahabi strains of Islam.

The girl reportedly had her Christian necklace removed by the first family and was banned from eating bacon by the second. They also spoke Arabic around the girl and encouraged her to learn the language.

Reports by social workers suggested the girl was often upset and tearful, and the child’s family and friends welcomed the judge’s decision to move her from a “foreign and unfamiliar” environment to somewhere “much more at home”.

Addressing lawyers for Tower Hamlets during the hearing on Wednesday, Judge Sapnara said that her “overriding concern [was] the welfare of the little girl”.

“You would presumably accept that the priority should be an appropriate, culturally matched placement that meets the needs of the child in terms of ethnicity, culture, and religion?” she said.

BREAKING: Lutfur Rahman Guilty of Corruption, Bribery and Making False Statements – Breitbart http://t.co/ANlZVsAJOw pic.twitter.com/reZ8i88M8r — Breitbart London (@BreitbartLondon) April 23, 2015

Kevin Gordon, counsel for the local authority, agreed but claimed that when the girl initially became the council’s responsibility, no ethnically British foster carers were available.

Tower Hamlets Council insisted it had the “welfare of children at the heart of what we do” and said they would like to give more details about the case to correct “inaccuracies”, but was legally restricted from doing so.

In 2015, the borough’s elected Muslim mayor, Lutfur Rahman, was removed from his position after he was found guilty of corruption, bribery, and using “undue spiritual influence” over voters.

The council was also accused of fostering tribal divisions and identity politics and frequently rewarding Muslim organisations with resources in return for their support.