Click to email this to a friend (Opens in new window)

Click to share on Twitter (Opens in new window)

Click to share on Facebook (Opens in new window)

Accused NXIVM sex-cult lieutenant Allison Mack strolled out of Brooklyn federal court Tuesday after posting $5 million bond and agreeing to stay under house arrest in California.

Lawyers for the “Smallville’’ TV actress-turned-alleged-cult leader have been in plea talks on the sex-trafficking and forced-labor conspiracy charges against her. Both sides agreed to allow Mack, 35, to be released while awaiting trial, and a judge then officially OK’d the deal.

As part of the agreement, Mack has to wear a GPS ankle bracelet and not have contact with other members of the cult, who reportedly include Seagram’s liquor heiress Clare Bronfman, “Battlestar Galactica” TV actress and Mack’s wife, Nicki Clyne, and India Oxenberg, the daughter of “Dynasty” TV star Catherine Oxenberg.

“Basically, avoid contact with anyone you know associated in any way with NXIVM. Do you understand?” Judge Viktor Pohorelsky asked Mack on Tuesday.

“Yes, your Honor,” Mack responded, appearing nervous with her hands behind her back and wearing a khaki jail outfit and blue sneakers.

Mack’s whereabouts will be monitored by California officials while she stays in her parents’ Los Alamitos, Calif., home awaiting her next hearing, officials said.

She will only be allowed leave the house for pre-approved activities, including traveling to Manhattan to meet with her lawyers or Brooklyn for court appearances.

Pohorelsky also forbade her from using the Internet without approval.

Mack did not respond to reporters’ questions as she walked out of court Tuesday evening. Her arms were locked with her lawyers, who were flanking her.

She wore makeup, pinstripe pants, a blue sweater and a denim jacket as she left the courthouse. Her hair was pulled back in a high ponytail.

Mack’s lawyer Sean Buckley said they want to get her to California as quickly as possible.

She will not require a government escort because she’ll be wearing the ankle monitor, a law-enforcement source said.

Mack’s mom Melinda secured the $5 million bond using Mack’s house in upstate Clifton Park, the family’s Los Alamitos home and a retirement account, authorities said. Melinda did not comment after court.

Mack and NXIVM leader Keith Raniere kept women as “slaves” and “branded” them with Raniere’s initials, prosecutors say.

Raniere was arrested in March, and Mack was arrested last week. Both have pleaded not guilty to sex trafficking.

It is possible Mack has cut a deal with prosecutors to inform on Raniere. Her lawyers filed an affidavit Friday temporarily waving her right to a speedy trial as “they are engaged in plea negotiations, which they believe are likely to result in a disposition of this case without trial.”

Nxivm spokesman-turned-critic Frank Parlato said the apparent cooperation could be a ruse, but “speculation by those around [Mack] is that she will wake up.”

Her next court date is May 3.