A Turkish-Iranian gold trader on Thursday told jurors in a New York federal court that Turkish President Recep Tayyip Erdogan personally authorized a transaction in a scheme to help Iran evade US sanctions.

Reza Zarrab is cooperating with US prosecutors in the criminal trial of a Turkish bank executive accused of helping to launder money for Iran.

At the time of the alleged conspiracy, Erdogan was Turkey's prime minister. Zarrab said he learned of Erdogan's involvement from Zafer Caglayan, who was Turkey's economy minister.

Erdogan said earlier on Thursday that Turkey did not violate US sanctions and "did the right thing" in dealing with Iran, CNN Turk reported.

A spokesman for Erdogan's government has called the case a "plot against Turkey."

Zarrab also said for the first time on Thursday that Turkey's Ziraat Bank and VakifBank were involved in the scheme. Ziraat denied the allegation. VakifBank could not immediately be reached for comment after business hours on Thursday.

The testimony came on the third day of the trial of Mehmet Hakan Atilla, an executive at Turkey's state-owned Halkbank , who has pleaded not guilty in Manhattan federal court.

US prosecutors have charged nine people in the case, although only Zarrab, 34, and Atilla, 47, have been arrested by US authorities.