A Manhattan federal judge on Wednesday ordered ex-mayor Rudy Giuliani and former attorney general Michael Mukasey to turn over their retainer agreements with Reza Zarrab, the well-connected Turk who the two GOP power brokers are trying to broker a diplomatic deal to free.

The action by U.S. District Judge Richard Berman follows complaints by the office of acting Manhattan U.S. Attorney Joon Kim that Giuliani’s and Mukasey’s law firms have conflicts of interest in the case and suggestions that the two may be using their Trump administration ties to do an end run around prosecutors.

advertisement | advertise on newsday

Multimillionaire gold trader Zarrab is accused of scheming to violate Iran sanctions. Giuliani and Mukasey have met with Turkish President Recep Tayyip Erdogan, a political ally of Zarrab, and spoken with U.S. officials about possible pro-U. S. Turkish actions that could help secure Zarrab’s release.

Berman said he needs the retainers and a description of the “nature of the work and the roles” Giuliani and Mukasey have performed to assess whether their law firms have connections with banks involved in the case that would create a conflict of interest, and also to “safeguard and ensure the integrity of these proceedings.”

The defense had argued that Giuliani and Mukasey’s work was none of the prosecutors’ business. The judge said the information could be filed under seal, but noted, “These matters are unquestionably the court’s ‘business.’ ”

Mukasey’s son, Marc, is widely viewed as a front-runner to replace fired Manhattan U.S. Attorney Preet Bharara. Turkish officials have said Bharara was sympathetic to a U.S.-based dissident Turkey would like to extradite. President Donald Trump has business interests in Turkey, most notably office and residential high-rises known as Trump Towers Istanbul.