Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The prosecution's star witness implicated Turkish President Recep Erdogan in a scheme to evade U.S. sanctions on Iran during a trial that has strained relations between the two countries.

Gold trader Reza Zarrab, the linchpin of a plan to secretly move Iranian money through U.S. banks in violation of American sanctions, has been on the stand since Wednesday at the trial of Mehmet Hakan Atilla, an executive of Turkey's state-owned Halkbank.

Zarrab was shown the transcript of a 2012 phone call between himself and an employee that was caught on a wiretap in which they discussed two other Turkish banks that he told the court "wanted to do Iranian business" using the same system he devised for Halkbank.

"The prime minister gave orders to Zirrat and Vakif as well," Zarrab said on the phone call, referring to the other banks.

In this courtroom sketch, Turkish-Iranian gold trader Reza Zarrab, center, testifies before Judge Richard Berman, right, Wednesday, Nov. 29, 2017 in New York. At left is an interpreter. Elizabeth Williams / via AP

The prosecutor asked Zarrab what he meant by that, and he said the country's economic minister, Zafer Caglayan, told him the two banks were to move Iranian money, too.

"Mr. Zafer had told me Mr. Prime Minister has given approval," Zarrab told the jury.

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

Related: Does cooperating witness have info on Flynn tie to Turkey?

Asked who was referring to, Zarrab named Erdogan, who was then prime minister and is now president of Turkey.

There was a stir in the courtroom, which was packed with Turkish media covering the Atilla trial.

The jury was shown a transcript of a second call in which Zarrab said that by the following week the Zirrat and Vakif banks "will also be engaged."

"I spoke with Ankara," he explained to the other person on the call. "Mr. Prime Minister and Ali Babacan [the Turkish treasury minister] gave approval. It's finished already."

Asked to explain further, Zarrab told the court: "What I'm saying is that the prime minister of that time, Recep Erdogan, and the minister of the treasury, Ali Babacan, had given an order for them to start doing this trade. By them, I mean the banks."

Even before Wednesday's testimony the trial had infuriated Turkish authorities, with officials claiming that U.S. prosecutors are doing the bidding of Erdogan's rival, cleric Fethullah Gulen, who is in self-imposed exile in Pennsylvania.

"What (Gulen's movement) was not able to achieve here, it is trying to achieve there (New York)," Deputy Prime Minister Bekir Bozdag told a Turkish news agency on Thursday, according to the Associated Press.

Erdogan, who blames Gulen for a failed coup attempt, has pressed both the Obama and Trump administrations to drop the sanctions case.

Zarrab, 34, was supposed to be the lead defendant in the case but he began cooperating with prosecutors before the trial began.

When he first took the stand Wednesday, he was in jailhouse clothes. On Thursday, at the suggestion of the judge, he wore a suit.

Addressing the change of garb for the jury, prosecutors had Zarrab confirm that he was still in FBI custody despite his civilian clothes. Then they asked why he was no longer in jail.

"For security reason," he said, " for threats I have received in the detention center."

Zarrab previously admitted that during his time in federal lockup in Manhattan after his March 2016 arrest he bribed a prison guard for access to liquor and a cellphone.