A Turkish court has convicted an employee of a US consulate for "aiding a terrorist organisation", but released him on time served, Turkish state-run media reported.

Turkey's Anadolu Agency said the court in the southeastern province of Mardin sentenced Turkish national Hamza Ulucay to four years and six months in prison on Wednesday.

Ulucay, who worked for the US consulate in the southern province of Adana as an interpreter, was detained in February 2017.

He was freed on Wednesday, taking into account the time already served, but the court banned him from leaving the country. Anadolu said that during his trial Ulucay sought acquittal.

The US's charge d'affaires in Turkey, Jeffrey Hovenier, and consul-general in Ankara, Alejandro Hoot Baez, were present at the trial, Anadolu said.

Turkish courts had followed the same suit with Andrew Brunson, an evangelical pastor who was sentenced to three years in prison on terrorism charges but released last October after two years in prison. He denied the charges.

Brunson's detention caused a diplomatic crisis between Washington and Ankara, as the two countries hit each other with economic sanctions before Brunson was freed.

Life sentence sought for Topuz

Ulucay was one of two US diplomatic mission employees imprisoned in Turkey.

Turkish prosecutors are seeking a life sentence for Metin Topuz, who worked for the US consulate in Istanbul, accusing him of attempting to overthrow the government and espionage, Turkish media reported.

181012073353582

Reports earlier in the month said that the 78-page indictment on Turkish national Topuz said he was in "very intense contact" with police officers who led a 2013 anti-corruption probe that implicated top government officials.

Topuz has been in jail since October 2017.

The Turkish government accuses US-based religious leader Fethullah Gulen of attempting a "judicial coup" with that investigation and labelled his network a terrorist group. Gulen is also blamed for the 2016 failed coup but he denies the accusations.

Ankara repeatedly demands the US extradite Gulen.

Since the abortive putsch, Turkey has detained 160,000 people and dismissed nearly the same number of civil servants over suspected links to the coup attempt, according to the UN human rights office.