Accused Nxivm sex cult leader Keith Raniere’s teachings to his female followers included discussions of sex with children as young as 12, according to a disturbing video shown Wednesday in his sex trafficking trial.

“In some parts of the world, the age of consent is 17. In other parts of the world, the age of consent is 12,” Raniere wrote in a sermon delivered to members of his women’s-only group Jness.

The statement, read on the tape by Nxivm co-founder Nancy Salzman, sent a gasp through her students and the Brooklyn federal courtroom — where Raniere is facing charges of raping a 15-year-old girl.

On Tuesday, prosecutors said the alleged victim would go on to become his first “sex slave.”

Raniere also has been accused, though never charged, with raping a girl hundreds of times when she was 12 and 13 years old.

“Is the person a child, or is the person adult-like?” Salzman read to the group, which met once a month with the co-founder they knew as “Prefect.”

The discussion that month centered around how women use abuse and blame to get what they want, former “sex slave” Sylvie testified.

The 32-year-old previously testified she had been part of the group for a decade when she was recruited into a secret master-slave society called DOS, which had been pitched as a women’s empowerment group but was secretly headed by “grand master” Raniere.

“I think we were all like, ‘Whoa,’ regarding the age of consent being 12,” Sylvie told jurors. “Now it doesn’t make sense, but we’d always just agree.”

In the video, Salzman tells the group “abuse is a human construct,” and that women use false claims of abuse as a “rip-cord” in order to get their own ways.

The footage panned around the room to show a pensive-looking Sylvie and more than 20 others — including alleged sex slaves and women Sylvie identified as “teenagers.”

It’s unclear when the video was shot.

Other tenets taught in Jness, a series of courses available to Nxivm members, included the idea that women are inherently monogamous and men are, at their root, allowed to have multiple sexual partners.

Raniere is facing charges of racketeering conspiracy, including acts of child sexual exploitation and possession of child pornography.

Salzman pleaded guilty to a charge of racketeering conspiracy in March.