(Bloomberg) -- U.S. prosecutors were bearing down last year on a state-owned Turkish bank implicated in a sanctions case that had long been an irritant for Turkish President Recep Tayyip Erdogan.

Erdogan asked both the Obama and Trump administrations to drop the matter. Rudy Giuliani got involved, mounting an audacious shadow diplomacy effort to extract a key Turkish suspect from U.S. custody. President Donald Trump asked a member of his cabinet to steer prosecutors away.

Still, federal officials secured the conviction of two people who they said helped channel $20 billion to Iran in violation of U.S. sanctions. By the summer of 2018, U.S. authorities had started wrangling with Turkish authorities about a costly financial penalty against the bank itself, Turkiye Bank Halkasi AS, according to people with knowledge of the discussions.

Since then, the investigation has gone quiet.

That silence might have escaped notice, but for Trump’s controversial and recent communications with the Turkish president. After a phone call with Erdogan on Sunday, Trump withdrew U.S. support from Kurdish fighters along Syria’s border with Turkey, opening the way for a Turkish incursion that began Wednesday. The White House threatened more sanctions against Turkey on Friday. The rapid-fire mix of concessions and threats against the country served as a reminder of the allies’ uneasy relationship -- in which the sanctions investigation has been a major pressure point.

Word of Trump’s dealings with Turkey interrupted blanket news coverage of a congressional impeachment inquiry into his dealings with Ukraine. Lawmakers are focusing on whether Trump tapped the machinery of the state to advance his personal agenda there, while using personal emissaries to steer U.S. policy. The Turkey matter echoes the Ukraine episode -- once again placing Trump and Giuliani at the center of ad hoc diplomacy and private requests between leaders.

It’s unclear where the Halkbank investigation stands. Complex financial investigations can move slowly, requiring coordination between the Justice Department, the U.S. Treasury’s sanctions-enforcement unit or other agencies. Diplomatic considerations can add to the complexity. For criminal inquiries, the Justice Department can choose to close an investigation without charges, sometimes via formal notice, but there’s no indication of what it may have done in this instance.

The Manhattan U.S. attorney’s office and the Justice Department in Washington declined to comment.

Halkbank and Turkish officials didn’t respond to requests for comment. The White House didn’t immediately comment.

Failed Swap

At the center of the U.S. inquiry was Reza Zarrab, a flamboyant Turkish gold trader who said he’d helped Iran tap funds from overseas oil sales that was frozen in foreign accounts.

Zarrab, who’s married to a Turkish pop star, had a tabloid lifestyle of yachts, fast cars and an office in a Trump Tower in Istanbul. After he was detained during a 2016 trip to the U.S., he added Giuliani to his legal team.

Giuliani attempted to broker a diplomatic deal with Turkey to extract Zarrab from U.S. custody, attempting to swap him for an American pastor, Andrew Brunson, who was in Turkish custody.

Giuliani’s role apparently went deeper than previously reported: At Giuliani’s urging, in the second half of 2017, Trump asked then-Secretary of State Rex Tillerson to press the Justice Department to drop its case against Zarrab, Bloomberg News reported on Wednesday.

Read More: Trump Urged Tillerson to Help Giuliani Client Facing DOJ Charges

Giuliani, in an interview, said he talked to the State Department in his role as Zarrab’s lawyer and said he behaved ethically and legally. He would have been a hero had he arranged the swap with Brunson, he said.

Giuliani’s efforts to spring Zarrab were unsuccessful. The Turk ultimately pleaded guilty. In a twist, he became the prosecution’s star witness in a trial that resulted in the conviction of a Halkbank executive, Mehmet Hakkan Atilla.

The proceedings in a Manhattan federal court gripped Turkey. Some testimony sent its markets into gyrations, in part because prosecutors aired evidence that tied the scheme to Turkish officials and their families. An ex-finance minister was charged in absentia.

Unsparing Presentation

Prosecutors were unsparing in presenting evidence of Halkbank’s alleged complicity in the laundering scheme. Standing in front of an easel, Zarrab drew a schematic diagram of how the operation’s crucial initial stages took place within Halkbank.

The state-run bank would transfer money from frozen Iranian accounts there into one of Zarrab’s accounts. Zarrab would then convert the cash to gold and ship it to Dubai, where it could be used to make payments on Iran’s behalf.

Testimony and evidence also tied the bank’s then-chief executive officer, Suleyman Aslan, to millions of dollars in bribe payments linked to the scheme, some of which was later found stuffed into shoe boxes in his home. Charges against Aslan in Turkey were dropped, and he was charged in absentia in the U.S. He has said he collected the money to build schools.

Other evidence included text messages and wiretapped telephone conversations between Zarrab and bank executives as they plotted the operation. In one recorded call, Atilla coached Zarrab on how to falsify customs records to avoid arousing suspicions. Evidence also emerged that top Turkish officials, including Erdogan, had condoned Zarrab’s plan.

U.S. relations with Turkey, already in tatters, deteriorated. Turkey’s government dismissed allegations against Erdogan as fabrications, with a government spokesman branding the case a plot against the country.

Pursuing Banks

After Atilla was convicted in early 2018, the acting U.S. attorney at the time, Joon Kim, said banks that had aided Iran risked losing their right to transact in U.S. dollars, a crucial tool in international finance.

The apparent peril to the bank was echoed by the probe’s lead investigator. In August 2018, an FBI agent, Jennifer McReynolds, said the Justice Department’s inquiry was designed to “disrupt and dismantle banking and financial institutions who knowingly violated sanctions.”

McReynolds was speaking at an event hosted by the Foundation for Defense of Democracies, a national security think tank that has supported Israeli issues, advocated a hard line on Iran and provided an expert witness in the Atilla trial. McReynolds told the audience that Atilla’s conviction “was only the end of the beginning.”

Around the same time, U.S. authorities were engaged in talks with Turkish officials to resolve the investigation into the bank itself, according to the people familiar with the matter. The demand was for the bank to pay a fine to atone for the alleged violations or face a case against the bank in a U.S. court, they said. The U.S. came up with a penalty figure using a formula it has applied to similar cases, which accounts for factors including how much money moved and in how many instances, one of them said.

The Turkish side maintained innocence and refused to settle, the people said.

Also that August, Turkey sent a delegation to Washington that expressed concerns to the State Department and Treasury Department over the proposed Halkbank fine, as part of negotiations over Brunson, who returned to the U.S. in October.

In public comments in November 2018, Erdogan said he raised the issue of the proposed Halkbank penalty with Trump. He said Trump expressed surprise that the issue was still dragging on and assured him he would “give an order” to relevant authorities about the case. Trump doesn’t appear to have addressed Erdogan’s statement.

“The administration has elected not to prioritize this case,” said Jonathan Schanzer, a senior vice president with the Foundation for Defense of Democracies, the pro-Israel group. “This does seem incongruous with the administration’s overall policy regarding Iran. If the goal is to demonstrate that those who aid and abet Iran will suffer consequences, Halkbank would be a prime example.”

‘Destroy and Obliterate’

Trump’s order on Monday to withdraw U.S. forces from Syria’s border with Turkey came shortly after the previous day’s call between Trump and Erdogan. Facing criticism for the move on Monday, the president said he wouldn’t condone Turkish attacks on the U.S.’s Kurdish allies. In a tweet, Trump wrote that if Turkey were to undermine U.S. interests in the region, he had the power to “totally destroy and obliterate the economy of Turkey.”

Trump didn’t say what he was referring to, and neither did the White House. Some sanctions analysts interpreted the comment as a reference to his imposition of economic penalties against Turkey for its purchase of a Russian missile system last year.

What, if anything, the president had in mind remained unclear as Erdogan formally announced that Turkey had launched a military offensive into the Kurdish-controlled areas. Trump said he’d made clear to Turkey that the incursion was a “bad idea.”

Meanwhile, the wherabouts of Zarrab, the mastermind-turned-witness, are unclear. Atilla, the Turkish banker who was sentenced last year to three years in U.S. prison, was released in July. He was immediately deported to Turkey, where he was greeted at the airport by his family, as well as by Halkbank’s CEO and Turkey’s finance minister, who is Erdogan’s son-in-law.

--With assistance from Nick Wadhams and Stephanie Baker.

To contact the reporter on this story: Christian Berthelsen in New York at cberthelsen1@bloomberg.net

To contact the editors responsible for this story: Jeffrey D Grocott at jgrocott2@bloomberg.net, David S. Joachim

©2019 Bloomberg L.P.