During a contentious Oval Office meeting with President Trump and Secretary of State Rex Tillerson in 2017, Rudolph W. Giuliani pressed for help in securing the release of a jailed client, an Iranian-Turkish gold trader, as part of a potential prisoner swap with Turkey.
The request by Mr. Giuliani provoked an immediate objection from Mr. Tillerson, who argued that it would be highly inappropriate to interfere in an open criminal case, according to two people briefed on the meeting.
The gold trader, Reza Zarrab, had been accused by federal prosecutors of playing a central role in an effort by a state-owned Turkish bank to funnel more than $10 billion worth of gold and cash to Iran, in defiance of United States sanctions designed to curb Iran's nuclear program.
But at the White House meeting in early 2017, Mr. Giuliani and his longtime friend and colleague, former Attorney General Michael Mukasey, pushed back on Mr. Tillerson's objections.
Rather than side with his secretary of state, Mr. Trump told them to work it out themselves, according to the two people briefed on the meeting. They spoke on the condition of anonymity because they were not authorized to discuss the matter.
In the end, no such prisoner swap took place. But the episode has opened a new chapter in Mr. Giuliani's efforts to interject himself into the Trump administration's diplomacy while at times representing clients with a direct interest in the outcome.
The Oval Office meeting occurred before Mr. Giuliani became Mr. Trump's personal lawyer for the special counsel's Russia investigation. In recent weeks, Mr. Giuliani's campaign to press Ukrainian officials to investigate the son of one of Mr. Trump's political rivals, former Vice President Joseph R. Biden Jr., has thrust him into the middle of the House impeachment inquiry. And on Wednesday, two of Mr. Giuliani's associates in that campaign were arrested on charges of violating federal campaign finance laws.
Mr. Giuliani, in an interview on Thursday, defended his actions in the gold trader case, which were first reported on Wednesday by Bloomberg.
Mr. Giuliani, well known for his hawkish views on Iran, said he had been willing to represent Mr. Zarrab because the proposed prisoner swap would have secured the release of an American pastor who was being held in Turkey on terrorism-related charges the United States considered fabricated.
He likened his efforts — which also included apprising Jeff Sessions, then the attorney general, of what he wanted — to maneuvers during the Cold War to trade enemy spies for Americans detained overseas.
Mr. Giuliani questioned how his actions were any different. "It happened to be a good trade," he said. "I expected to be a hero like in a Tom Hanks movie."
But his involvement, as a private citizen and friend of the president in the months after Mr. Trump passed him over for the role of secretary of state, left some in the administration uncomfortable, given the strained and complicated relationship between the United States and Turkey.
Mr. Giuliani's moves also ran counter to a long-running American effort to curb Iran's nuclear program as the United States was trying to punish players, like Mr. Zarrab, who helped the regime evade sanctions.
The case, called the single largest evasion of Iranian sanctions in United States history, revolved around a scheme by the Turkish bank in 2012 and 2013 to send billions of dollars in gold and cash to Iran in exchange for oil and natural gas.
Mr. Zarrab, who has Turkish and Iranian citizenship, was arrested in Florida in March 2016 on a family trip to Disney World, and was accused of an illicit operation that relied on false documents and front companies to move the assets to Iran from the accounts of Halkbank, the second-largest state-owned lender in Turkey.
Getting him out of the United States was a high priority for Turkey's president, Recep Tayyip Erdogan, because Mr. Zarrab had information that would later implicate senior bank officials, as well as Turkish government officials, in the scheme.
Indeed, after the prison swap failed, Mr. Zarrab became a key witness and testified that in 2012, Mr. Erdogan, then Turkey's prime minister, had ordered that two Turkish banks be allowed to participate in the sanction-evasion scheme.
Mr. Giuliani said that he was brought into the effort by Mr. Mukasey, who had been hired by Mr. Zarrab's lawyer, Benjamin Brafman.
The two men had been pressing their case with Mr. Trump in the Oval Office in early 2017 when Mr. Tillerson joined the conversation, according to the two people briefed on the meeting. Mr. Tillerson, who could not be reached for comment, was surprised to find Mr. Giuliani and Mr. Mukasey at what he thought would be a regular private meeting with the president, the people said.
Mr. Trump asked Mr. Giuliani to tell Mr. Tillerson what he wanted, which prompted Mr. Tillerson's objections.
Mr. Mukasey's spokesman did not return a request for comment.
Mr. Giuliani, in the interview on Thursday, disputed the account provided to The New York Times of his discussion with Mr. Tillerson about Mr. Zarrab — and the assertion that Mr. Tillerson replied that such a step was inappropriate. But Mr. Giuliani did not specify what aspects of the account he found inaccurate, saying he could not discuss the meeting because of attorney-client privilege.
"This is a completely malicious story coming from the consistent attack on me to try to destroy my credibility," Mr. Giuliani said.
He added that at the time, "nobody ever complained" to him from the Trump administration about his role in the case.
Mr. Giuliani and Mr. Mukasey were persistent in the effort. Court filings show that they discussed the matter with State Department officials in Turkey before meeting with Mr. Erdogan himself, and that Mr. Sessions and Preet Bharara, then the United States attorney for the Southern District of New York, were informed "on a confidential basis."
Mr. Giuliani argued in court filings that "none of the transactions in which Mr. Zarrab is alleged to have participated involved weapons or nuclear technology, or any other contraband, but rather involved consumer goods, and that Turkey is situated in a part of the world strategically critical to the United States."
And Mr. Mukasey, in an April 2017 court filing, asserted that "senior U.S. officials have remained receptive to pursuing the possibility of an agreement."
But officials at the United States attorney's office in Manhattan remained opposed to the Zarrab trade, as did Mr. Tillerson. Mr. Giuliani, in the Thursday interview, said he wasn't sure why the proposal fell apart.
What's clear is that Mr. Zarrab pleaded guilty in October 2017 to the charges, and became a key witness in federal criminal cases prosecuted in New York that led to the conviction of Mehmet Hakan Atilla, an executive at Halkbank.
During Mr. Atilla's criminal trial in late 2017, the judge overseeing the case criticized Mr. Giuliani's role in trying to secure Mr. Zarrab's freedom, noting that such a move might benefit Iran.
"Most respectfully, the Giuliani and Mukasey affidavits appear surprisingly disingenuous in failing to mention the central role of Iran in the indictment, and indeed, failing to mention Iran at all in their affidavits," the judge, Richard M. Berman, said, citing statements in which the men suggested Mr. Zarrab's release might help the United States.
Mr. Atilla was sentenced to 32 months in prison. But he was released early from jail in July and then returned to Turkey, where he was greeted at the airport like a hero in Istanbul by Turkey's treasury and finance minister, Berat Albayrak, who is also Mr. Erdogan's son-in-law. Mr. Zarrab's whereabouts have not been disclosed by the United States government.
The American pastor, Andrew Brunson, was also released, without a trade involving Mr. Zarrab, in October 2018. The move was credited with an overall improvement in relations between Mr. Trump and Mr. Erdogan.