‘Smallville’ actress Allison Mack appearing in Brooklyn court for bail hearing in sex cult case

An actress best known for playing a young Superman's friend has been granted bail while fighting charges that she helped recruit women into a cult-like group.

A federal judge in Brooklyn agreed Tuesday to release Allison Mack on $5 million bond and place her under home detention in California. She'll be living with her parents.

She has pleaded not guilty to sex trafficking.

Mack was charged Friday for sex trafficking after federal prosecutors said she worked as a slave "master" recruiting women to NXIVM, a group led by Keith Raniere. Raniere sold himself as a self-improvement guru to the stars but in reality, according to prosecutors,  turned female followers into brainwashed “slaves” who were branded with his initials and coerced into having sex.

Raniere is being held on trafficking charges, and his attorneys have said he's innocent.

Mack, 35, starred in The CW network's "Smallville," ending in 2011, a reimagining of the early life of Superman, but has played only minor roles since then. Prosecutors have accused her of collecting collateral, including nude photos and other damaging information, from members to stop them from leaving or revealing anything about the group publicly. She is also charged with grooming members of the group to become Raniere's sex slaves.

Mack is considering a plea deal that would allow her to avoid a trial, a source told PIX11.

If convicted on all charges, she faces 15 years to life in prison.