One of the lawyers who has been defending Nxivm sex cult leader Keith Raniere now wants to switch sides — to become a federal prosecutor.

The US Attorney’s Office revealed in a letter to Brooklyn federal Judge Nicholas Garaufis on Wednesday that attorney Teny Geragos has applied for a job with the US Attorney’s Office in Brooklyn, and called for a hearing to determine if there is a conflict of interest

Geragos used prosecutors who worked on the trial — which saw Raniere found guilty in June for running the upstate cult, where women were branded like cattle and forced to have sex with him — as references on her application to the US Attorney’s Office, the letter said.

Raniere was initially set to be sentenced on charges including racketeering and sex trafficking later this month, but that has been postponed.

In their letter, prosecutors said that, because Geragos — who currently works at Manhattan firm Brafman & Associates — was not the lead lawyer on Raniere’s case, the chances of her making any decisions that would give an advantage to her would-be new employers is “remote.”

But they nevertheless requested a hearing to advise Raniere on the potential conflict.

“It is possible that Ms. Geragos could make decisions in connection with her representation of you, consciously or unconsciously, with an eye to how such decisions might affect her application to work for the United States Attorney’s Office,” the prosecutors suggested the court tell Raniere.

“For example, Ms. Geragos could wish to avoid antagonizing the government, and advise you to take certain positions in your case in order to please the government. Such decisions may have a negative effect on how your criminal case or sentencing proceeds with respect to your situation.”

Brafman & Associates founder Benjamin Brafman insisted Geragos’ application wouldn’t create any conflict.

“Ms. Geragos is a talented young criminal defense lawyer with great experience and devotion to public service, and she would be a tremendous asset to the EDNY,” said Brafman.

“Because Marc Agnifilo of this firm was and remains lead counsel for Mr. Raniere, Ms. Geragos’ pending application to the US Attorney’s Office will not create any conflict that cannot be waived.”

Geragos isn’t the only lawyer in the Nxvim case who has been eyeing the other side of the courtroom: Lead prosecutor Kim Penza has gone into private practice, joining the law firm Wilkinson Walsh + Eskovitz, the company announced Wednesday.

In a release announcing the move, the firm lauded her “groundbreaking prosecution” of Raniere.