ANKARA, Turkey -- Turkish President Recep Tayyip Erdogan has slammed the conviction in New York of a Turkish banker accused of helping Iran evade sanctions, saying the U.S. justice system poses a danger for the world.

Speaking before departing for a visit to Paris, Erdogan on Friday again branded the trial against Halkbank deputy general manager Mehmet Hakan Atilla as a U.S. conspiracy against his government.

Atilla was convicted Wednesday of five counts, including bank fraud. His trial included testimony suggesting high-level corruption in Turkey.

Turkish President Recep Tayyip Erdogan gestures as he speaks during a joint press conference with Serbia's President Aleksandar Vucic (not in the picture) after their meeting in Belgrade, Serbia, Oct. 10, 2017. REUTERS

Erdogan said if Atilla's conviction is considered justice in the U.S., then "the world is doomed," and he warned bilateral legal agreements between the two countries were "losing validity."

Get Breaking News Delivered to Your Inbox

The Turkish leader also accused the U.S. of "disrespecting" the Turkish judiciary for failing to extradite U.S.-based Muslim cleric Fethullah Gulen, whom Turkey blames for a failed coup in 2016. Gulen denies involvement. Erdogan said legal agreements were losing their validity due to the U.S. stance.