ISTANBUL (Reuters) - Turkey condemned the sentencing of an executive from one of its state-owned banks as a political attack by the United States on Thursday, after a New York court handed down a 32 month prison sentence in an Iran-sanctions busting case.

Mehmet Hakan Atilla, previously the deputy general manager at Halkbank, was sentenced by a U.S. district judge for his role in a scheme to help Iran evade U.S. sanctions.

While the penalty was significantly lighter than the 20 years sought by prosecutors, the case has strained ties between Turkey and the United States, both members of the NATO alliance.

Turkey has repeatedly cast the case as a political attack against it, motivated by forces within the U.S. judiciary and government sympathetic to the Muslim cleric Fethullah Gulen, blamed by Ankara for a 2016 coup attempt.

“The court violated the law, it did not carry out a fair trial,” Bekir Bozdag, the government’s spokesman, said on Twitter.

“This case is concrete proof of the cooperation of FETO, CIA, FBI and the U.S. justice system,” he said. FETO is the term the Turkish government uses to describe Gulen’s network.

Halkbank has so far declined to comment on the sentencing. It has previously said that all of its transactions were lawful.

Gulen, who has lived in the United States since 1999, has denied involvement in the coup and condemned it. Washington’s unwillingness to extradite Gulen - it says extradition requests must go through the courts - has infuriated Ankara.

Shares of Halkbank rose more than 8 percent in early trade in Istanbul. They were up 2 percent at 0900 GMT.

U.S. prosecutors accused Atilla of joining a plot led by Reza Zarrab, a wealthy Turkish-Iranian gold trader, who U.S. authorities arrested in 2016 and later pleaded guilty to fraud, conspiracy and money laundering charges. Zarrab testified for several days as the prosecutors’ star witness against Atilla.

Atilla has already spent 14 months in jail since his arrest last year. That time will count toward his sentence, and he may be freed early for good behavior.