NEW YORK -- A banker accused of helping Iran evade economic sanctions was convicted Wednesday in a case that strained ties between the United States and Turkey with its testimony about corruption at the highest levels of the NATO ally's government.

Mehmet Hakan Atilla, a 47-year-old deputy general manager at Turkey's state-run Halkbank, was charged by U.S. authorities with taking part in a complex scheme in which Iran traded its oil and gas for gold, with some of the proceeds moved through U.S. financial institutions without their knowledge.

He was convicted of four conspiracy counts, including conspiracy to defraud the United States, plus one bank fraud count. He was acquitted of a money laundering charge.

Get Breaking News Delivered to Your Inbox

The prosecution's star witness, Reza Zarrab, a Turkish-Iranian gold trader who admitted orchestrating the deals with Iran, testified that he paid over $50 million in bribes to Turkey's finance minister in 2012 to advance the scheme and that he believed Turkish President Recep Tayyip Erdogan knew about the plot.

Turkey's leaders lashed out over the case throughout the trial, with Erdogan calling it an American conspiracy to "blackmail" and "blemish" his country. Turkey, a key strategic partner of the U.S. in the Mideast, has taken an increasingly authoritarian turn under Erdogan.

In the decades after the Iranian hostage crisis, in which 52 Americans were held captive from 1979 to 1981, the United States imposed increasingly stiffer sanctions prohibiting virtually all U.S. financial dealings with oil-rich Iran, including many bank transactions.

Atilla's lawyer said his client was just a "hapless and helpless pawn" duped in a conspiracy hatched by his boss at Halkbank and Zarrab. Prosecutors, though, said phone recordings captured Atilla setting up bogus food and agricultural deals with Iran to disguise payments for oil sales.

Atilla was arrested after visiting the U.S. last March on a business trip. Zarrab, a celebrity of sorts in Turkey because of his wealth and marriage to Turkish pop star and TV personality Ebru Gundes, was arrested in 2016 when he flew to Florida to take his wife and child to Disney World.

Before the trial, Turkey officials called Zarrab, 34, a "hostage." Zarrab hired former New York Mayor Rudy Giuliani and ex-Attorney General Michael Mukasey to meet with Erdogan and U.S. officials and try to broker a diplomatic solution to the charges. When that effort failed, Zarrab agreed to cooperate with prosecutors.

On the witness stand, Zarrab said that in addition to the bribes he paid over the gold deals, he made even more payoffs to government officials after he was arrested in Turkey in a corruption case there in 2013.

A former Turkish police official, Huseyin Korkmaz, testified that the corruption investigation he had built against Zarrab and others in the gold-for-oil case was promptly quashed. Korkmaz said he was arrested and imprisoned for 18 months, then had to flee Turkey, taking the evidence with him. Some of that material, which included documents and recorded phone calls, was introduced at Atilla's trial.

Turkish officials have portrayed the original corruption investigation and the U.S. prosecution as a conspiracy hatched by followers of Fethullah Gulen, a Turkish cleric living in self-imposed exile in Pennsylvania.

Erdogan has accused Gulen of being behind a botched 2016 coup attempt and has sought his extradition. Gulen has denied the allegations, and U.S. officials have rebuffed Turkey's extradition demands, citing a lack of evidence.

As the trial unfolded in New York, Turkey's official media said prosecutors there had demanded the seizure of Zarrab's assets as part of an investigation into claims he spied for a foreign country. Turkish authorities also issued detention warrants for Korkmaz's parents, wife and siblings.