Nxivm turned to a New York doctor who was one of its members to brand female members — and who partied with the cult’s slaves on a remote Fijian island, according to testimony Thursday.

Dr. Danielle Roberts was identified as a bikini-clad brunette smiling off the coast of Nxivm’s lush resort headquarters in a 2014 photo that also featured at least three alleged slaves.

“I believe she was a slave and a master, and the person who actually did the branding,” member-turned-whistleblower Mark Vicente told jurors in Brooklyn federal court.

“She was the brander.”

Vicente accused Roberts of wielding a cauterizing pen to sear Nxivm founder Keith Raniere’s initials into women in secretive branding ceremonies.

Roberts has not been charged with a crime but the 37-year-old osteopath is under investigation by the New York state Department of Health over allegations that she “participated in the initiation ceremony for a secret society, which involved the branding of female initiates with a cautery pen without anesthesia and under duress,” according to court papers reported by the Albany Times Union.

In the photo, Roberts appears sun-kissed and carefree as she poses in crystal-clear waters with a group that Vicente said included three other slaves — Alejandra, Sahajo and Rebecca — all members of the Nxivm subset called DOS.

On Wednesday, jurors in Raniere’s ongoing sex-trafficking trial got a never-before-seen peek into the Fijian island that Seagram heiress and Nxivm bankroller Clare Bronfman helped buy.

Vicente, who spent 12 years as a high-ranking Nxivm member, said he took the photos in May 2014 and sent them to Raniere, Bronfman and fellow member Alex Betancourt.

He was grilled by Raniere’s lawyer, Marc Agnifilo, about all-expenses-paid trips to the island on the upstate group’s dime.

“I was working the entire time so I didn’t get a chance to enjoy things,” Vicente said.

Another photo shows Vicente with members of the group’s Vancouver center — including “Smallville” actress Kristin Kreuk and DOS member Sarah Edmondson.

Meanwhile, it was revealed in court that Nxivm member Lauren Salzman will be a cooperating witness against Raniere, testifying as soon as Friday.

She, as well as her mom, ­Nxivm co-founder Nancy Salzman, “Smallville” actress Allison Mack, Bronfman and accountant Kathy Russell have all pleaded guilty.