Rudy Giuliani and Michael Mukasey tried to broker a prisoner exchange between the United States and Turkey to free their Turkish client, Reza Zarrab, he testified in Manhattan federal court Wednesday.

Zarrab said on the stand he hired lawyers to attempt to negotiate a prisoner exchange between the U.S. and Turkey “within the legal limits,” but that they were unsuccessful. He did not name the attorneys, but Giuliani and Mukasey were previously identified as the lawyers working to strike a diplomatic deal for Zarrab.

Zarrab, a Turkish gold trader, was the architect and main facilitator of a cash-for-gold scheme to help Turkey buy Iranian oil and evade sanctions.

Giuliani, the former mayor of New York, is a long-time friend of Trump who was considered for several Cabinet posts. Mukasey was attorney general under President George W. Bush.

Giuliani and Mukasey avoided mentioning the “central role” of Iran in the charges against Zarrab on filings submitted to the court about their work and said the case had no serious implications for U.S. national security. Judge Richard Berman slammed the omissions as “disingenuous” earlier this year. (Giuliani previously called Iranians “suicidal homicidal maniacs.”)

It is not known who the American in Turkish custody was, but Ankara has been cracking down on Americans since an attempted coup in 2016.

In one instance, an American journalist arrested at the Turkish-Syrian border was told by a judge that it was “all your government’s fault.” Other American citizens, and Turkish nationals working for American embassies, have been arrested and accused of links to Gulen and his followers. They include an American pastor and a NASA physicist with dual citizenship.

Prosecutors on Tuesday revealed that Zarrab flipped and was cooperating with authorities in the case against co-defendant Mehmet Hakan Atilla, a former state bank deputy general manager, who is also charged with evading sanctions.

On Wednesday, Zarrab also admitted to bribing a former Turkish minister of the economy with more than €45 million so he could trade gold with Iran in spite of sanctions.

"He asked about the profit margins, and he said, I can broker this providing there's a profit share, 50-50," Zarrab testified through a translator.

Zafer Caglayan, the former economy minister, was charged in the case in September.

The gold trader also outlined for the jury two different schemes for conducting business. In one drawing, he explained how a regular gold trade works. In the other, he outlined how he used his own companies and Turkish banks to facilitate the Iranian oil sales.

Zarrab's testimony over as many as three days in the trial is expected to shed light on the far-reaching sanction dodge scheme, and may even implicate high-ranking Turkish officials.

The allegations have roots in Turkey's 2013 corruption scandal, which alleged that top Turkish ministers took bribes to sign off on the scheme. The possibility of domestic scandal has also led Turkish President Recep Tayyip Erdogan, who was the prime minister in 2013, to attempt to cajole the US government into releasing Zarrab without trial.

Zarrab's plea, in which he admitted to seven different charges, also raised questions about whether he may be cooperating with special counsel Robert Mueller's investigation into the Trump administration.

As reported earlier this month, Zarrab's release was allegedly one of the requests floated to former national security advisor Michael Flynn in a December 2016 meeting with Turkish representatives. Mueller is reportedly investigating their $15 million offer to Flynn in exchange for freeing Zarrab and kidnapping exiled Turkish cleric Fethullah Gulen.