CHATHAM, Ont. -- An Ontario judge has ruled that 13 children from an ultra-Orthodox Jewish sect must be turned over to child protection authorities in Quebec.

Most of the Lev Tahor community of about 200 people left Quebec while they were being investigated by social services and settled in Chatham, Ont., in November.

The court in Quebec ordered in their absence that 14 of the children be placed in foster care and children's aid in Chatham had asked the court to enforce that order.

Ontario Court Judge Stephen Fuerth ordered Monday that the children -- with the exception of a 17-year-old who is also married and a mother -- be returned to Quebec to the care of child welfare there.

The community was under investigation for issues including hygiene, children's health and allegations that the children weren't learning according to the provincial curriculum.

The community denies any mistreatment of the children and says they were already planning to move out of Quebec.

The judge has put a 30-day stay on the order to give the families a chance to appeal.

During those 30 days, child protection workers in Chatham will be allowed to randomly drop in on the community to make sure the children are still there and to assess their well-being.

Fuerth was critical of the community's decision to leave Quebec in the middle of the night, which he says was clearly done in haste.

"The unilateral actions of the respondents to flee from Quebec placed these children at further risk of harm and could not be construed as concern for the interests of their children," he said in his decision.