Seagram’s heiress and accused Nxivm benefactor Clare Bronfman tried to buy influence for the alleged sex cult by illegally raising money for Hillary Clinton’s 2008 presidential campaign, a former group member testified in court Monday.

Bronfman funneled thousands of dollars into Clinton’s campaign coffers — far in excess of legal limits to contributions — to “curry favor” with the powerhouse political family, according to Mark Vicente, a documentary filmmaker and former member of the Nxivm group that is accused of keeping women as sex slaves.

“Clare Bronfman approached other people and said she would like to make a campaign contribution but she couldn’t make it above a certain amount,” Vicente testified in Brooklyn federal court Monday.

“I wrote a check. She paid me back.”

Vicente said the check was for somewhere between $2,000 and $3,000. Individual contributions to federal campaigns were capped at $2,300 at the time.

Vicente could not recall whether the money went to Bill or Hillary Clinton but admitted “maybe it was her” when prosecutor Mark Lesko reminded him that Hillary ran for president that year.

“There was a strong desire to meet people within politics,” Vicente added.

Nxivm members and their families plunked down a total $29,000 for Hillary’s campaign that year, elections records showed at the time.

Bronfman — who used her fortune to fund Nxivm and the whims of its leader, Keith Raniere — is accused of helping Raniere steal email passwords from “perceived enemies,” laundering money to help a non-citizen enter the US and paying off debts Raniere racked up on the credit card of a dead girlfriend.

She is also accused of recruiting and grooming young women to join a secret society within Nxivm called DOS which allegedly served as a harem for Raniere.

The 40-year-old heiress pleaded guilty last month to charges of conspiracy to conceal and harbor an illegal alien for financial gain, and fraudulent use of identification for her role in the cult.

Raniere has pleaded not guilty to charges including racketeering conspiracy involving acts of child sexual exploitation and possession of child pornography.