The Immigration and Refugee Board has ruled that a member of an ultra-orthodox Jewish sect arrested earlier this week should remain in detention because the man is not likely to leave Canada as ordered if he is released.

It's a twist in a case that has some members of Lev Tahor looking to stay in Canada, while others are attempting to leave.

IRB member Andrew Laut made his decision at a Toronto detention review for 39-year-old Avraham Kabaz Kashani, one of six​ Lev Tahor members who were arrested Wednesday in a raid by the Canadian Border Services Agency.

Some families in the religious community are at the centre of an ongoing child custody case, but authorities said the raids were made over the immigration status of certain individuals and were not related to the custody case.

Kabaz Kashani failed to leave Canada

Laut said that while he acknowledged the issues the community was facing, they weren't relevant to whether Kabaz Kashani should be set free.

Laut found that Kabaz Kashani overstayed a temporary resident visa issued in 2000 and then made several failed attempts to gain legal permanent status in Canada before he was ordered out of the country in 2007.

Laut noted that Kabaz Kashani did not voluntarily leave Canada, nor did he contact authorities about his status in the country until he was arrested this week.

Detention reviews for two other Lev Tahor members — Odel Malka and Yochanan Laver — are set to take place on Monday and Tuesday of next week.

Malka and Laver also had longstanding deportation orders against them.

Custody case decision expected Wednesday

The reviews are taking place at the same time as an appeal hearing in Chatham, Ont. in the custody case involving 14 children from the community.

Justice Lynda Templeton today ruled against a Lev Tahor motion for adjournment, saying the case is turning into a "procedural nightmare."

The judge said the court must move forward "cautiously and as quickly as possible" to determine whether the children should be reunited with their parents.

Templeton said she would listen to all the arguments and make a decision in writing next Wednesday. 

In the meantime, the judge ruled that the 17-year-old who is both a child and a parent involved in the custody case can return home to her parents in Chatham. However, her infant child is to remain with his foster family in Toronto.

The judge then turned her attention to the parents of two families and said she had serious concerns about them leaving the country, but allowed them to have access to their children under supervision.

Group fled Quebec after youth protection intervened

The group is appealing an Ontario judge's ruling that upheld a Quebec court order forcing 14 Lev Tahor children into foster care.

The families at the centre of the custody battle fled the country ahead of their initial appeal hearing date last month.

Templeton then ordered the emergency apprehension of all the children.

Six were discovered in Trinidad and Tobago and two were taken into custody at a Canadian airport. Six others remain in Guatemala, where they are reportedly seeking refugee status.

The original Quebec ruling came after the community of about 200 people left their homes in Ste-Agathe-des-Monts in the middle of the night and moved to Chatham just days after a child welfare agency started a court case against a couple of the families over allegations of mistreatment, forced marriages, child brides and not properly following the Quebec education curriculum.

The community has denied the allegations, which have not been proven in court.

With files from CBC News