A B.C. man who praised ISIS and was found to be a danger to the security of Canada has been ordered released from custody while he awaits deportation.

Othman Hamdan has been detained by the Canada Border Services Agency since Sept. 2017. At a detention review hearing on Friday in Vancouver, a member of the Immigration and Refugee Board of Canada ruled he be released, spokesperson Melissa Anderson said.

Hamdan must meet more than 25 conditions, many of them before he is released, Anderson added.

She could not elaborate on what those conditions are or provide an estimated timeline for his release.

Hamdan, a Jordanian national, says he moved to Canada from the U.S. in 2002 because of threats he'd received. He was granted refugee protection in 2004.

In 2018, the Immigration and Refugee Board of Canada ruled Hamdan was a "danger to the security of Canada" and deemed him inadmissible.

In a decision in October of that year, board member Marc Tessler wrote that while Hamdan has no history of violence, he "praised lone wolf attacks, actively promoted the Islamic State, disseminated instructions on how to commit attacks and seems fascinated with the extreme violence of the Islamic State demonstrated by possessing Islamic State videos depicting gruesome murders."

In 2017, he was acquitted in B.C. Supreme Court of terrorism-related charges related to his Facebook posts.

He was arrested by officers from the CBSA upon his release from custody.