After more than three weeks of testimony and four days of deliberation, a New York jury convicted a Turkish banker charged in a U.S. sanctions-busting case that strained relations between the two countries.

Hakan Atilla, 47, the deputy general manager of Halkbank, was found guilty of five counts of conspiracy and bank fraud but acquitted of money laundering. The verdict is likely to bring sharp rebukes from the government of Turkish President Recep Erdogan, who was implicated during the closely watched trial.

Hakan Atilla was convicted of five out of six counts. Elizabeth Williams / via AP

Atilla faces up to 30 years in prison when he is sentenced by U.S. District Judge Richard Berman in April. His attorneys say they will ask Berman to set aside the verdict, and if he declines, they will appeal.

Atilla, who was arrested on a business trip to New York in March, was charged with creating a system to secretly move Iranian money through American banks in violations of U.S. sanctions.

"Foreign banks and bankers have a choice: You can choose willfully to help Iran and other sanctioned nations evade U.S. law, or you can choose to be part of the international banking community transacting in U.S. dollars. But you can’t do both," Acting U.S. Attorney Joon Kim said in a statement.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"If you lie repeatedly to U.S. Treasury officials and fabricate documents — all as part of a secret scheme to smuggle billions of dollars in Iranian oil money past the U.S. sanctions net — as Atilla did, then you should be prepared for the consequences. The consequence of Atilla’s choice is now a felony conviction in an American court of law."

The prosecution's case hinged on the testimony of a flashy gold trader who went from being the lead defendant to the star government witness and spent nearly a week on the stand, drawing flow charts on poster board that showed how the scheme worked.

The defense took the risk of having Atilla testify in his own defense. He repeatedly and forcefully denied any role in the operation or knowing that Halkbank was violating sanctions — contradicting testimony from U.S. Treasury officials.

Even the prosecution agreed that Atilla never received a dime for his alleged misdeeds, while his boss at the bank and a government minister took millions in bribes to keep the money-laundering scheme going.

There were nine people indicted in the case, but seven of them are still in Turkey and have not been tried. The eighth, the gold trader Reza Zarrab, cut a deal with the government to testify against Atilla and spent nearly a week on the stand.

Acting USA Kim: With Reza Zarrab’s guilty plea and Hakan Atilla’s trial conviction, two men at heart of brazen scheme that blew billion $ hole in Iran sanctions regime, now stand convicted of serious fed crimes — US Attorney SDNY (@SDNYnews) January 3, 2018

Zarrab, who is married to a Turkish pop star, testified that he had lied to federal agents, pocketed $150 million in profits, doled out tens of millions in bribes to Turkish co-conspirators and even paid off a U.S. jail guard to get him booze and a cellphone.

He also testified that Atilla was intimately involved in the operation and told the jury about meetings and phone calls that supposedly proved that. But in a blow to prosecutors, the defense showed that Atilla was on a plane with no cellphone service at the time of one of those calls.

Much of the government's evidence came from a former Turkish police supervisor who stole documents and wiretap recordings from a 2013 corruption probe in Istanbul, fled to the United States and turned it over to police.

The Turkish government claims the 2013 investigation was a judicial coup mounted by a political rival of President Recep Erdogan, a cleric living in self-imposed exile in the U.S. Erdogan also blames the cleric, Fethullah Gulen, for an unsuccessful coup attempt in 2016.

The sanctions trial — which featured a wiretap in which Zarrab implicated Erdogan in the money-laundering effort — infuriated the Turkish regime, which at one point claimed the U.S. was in bed with terrorists.

Erdogan had twice asked the White House to scuttle the prosecution, and Special Counsel Robert Mueller had looked into allegations that the Turks tried to bribe former National Security Adviser Mike Flynn to get Gulen returned to Turkey and make the sanctions case vanish.