NEW YORK (NEWS10/AP) — Allison Mack, the former “Smallville” actress convicted for her role in the upstate New York sex cult NXIVM was sentenced to 36 months in federal prison on Wednesday. Judge Nicholas Garaufis said the sentence was necessary as a deterrent, recognizing Mack as both a victim and a perpetrator.

The sentence also includes a three-year term of supervised release, 1,000 hours of community service, and $20,000 in fines. As part of the terms of the sentence, she cannot contact anyone connected to the cult without permission from the court.

The judge is requesting that Mack be incarcerated near her home in California. She must surrender to authorities to begin serving her sentence by September 29.

During the sentencing hearing, two victim impact statements—one in person and one virtual—were read. Several other letters from victims were submitted.

Mack’s family were also in the Brooklyn courtroom on Wednesday, where the judge thanked her mother and brother for working to aid in her rehabilitation efforts. Attorneys for Mack had asked the sentencing judge for no prison time on Tuesday.

Mack—best known for her role as a Clark Kent’s friend on TV’s “Smallville” from 2001 to 2011—played a key role in the scandal-ridden, cult-like group NXIVM. She pleaded guilty to charges that she manipulated women into becoming sex slaves for the group’s spiritual leader. She was expected to seek credit for cooperating against leader Keith Raniere and taking responsibility for helping him create a secret society of brainwashed women who were branded with his initials.

At her sentencing in Brooklyn federal court, Mack renounced Raniere. “I made choices I will forever regret,” she said, also telling the judge she was filled with “remorse and guilt.”

Devoting herself to the self-improvement guru “was the biggest mistake and greatest regret of my life,” she had written in a letter filed with the court last week. “I am sorry to those of you that I brought into NXIVM,” she wrote. “I am sorry I ever exposed you to the nefarious and emotionally abusive schemes of a twisted man.”

She reiterated her apologies to the victims in court on Wednesday: “From the deepest part of my heart and soul, I am sorry.”

Under advisory sentencing guidelines, Mack would face between 14 and 17 1/2 years behind bars, but her defense team argued in court papers that probation or a sentence to home confinement is more appropriate. Prosecutors had agreed that any prison term should be below the guidelines range because of her cooperation.

“The NXIVM saga and the story of Ms. Mack’s descent have been a tragedy for all involved. But that need not, and should not, be the end of the story for Allison Mack,” her lawyers wrote in court papers.

Mack, 38, was once part of the inner circle of Raniere, whose group attracted millionaires and actors among its adherents. Prosecutors said she became a “master” for “slaves” she ordered “to perform labor, take nude photographs, and in some cases, to engage in sex acts with Raniere.”

As authorities closed in on Raniere, he fled to Mexico with Mack and others to try to reconstitute the group there. He was arrested and sent to the U.S. in March 2018; Mack was arrested a few days later. “Ms. Mack now understands that this was the best thing that could have happened to her at that time,” the defense papers said.

Mack provided information to prosecutors about how Raniere, now 60, encouraged “the use of demeaning and derogatory language, including racial slurs, to humiliate ‘slaves,’” the government papers said. More importantly, she provided a recording of a conversation she had with Raniere about the branding, they added.

The branding should involve “a vulnerable position type of a thing” with “hands probably above the head being held, almost like being tied down, like sacrificial, whatever,” Raniere told her. The women, he added, “should say, ‘Please brand me. It would be an honor.’ Or something like that.”

Raniere was sentenced last year to 120 years in prison for his conviction on sex-trafficking charges. A 41-year-old heir to the Seagram’s fortune, Clare Bronfman, was sentenced to nearly seven years in prison in September for her role as Raniere’s unwavering benefactor.