A GREEK court has sentenced eight Turkish military personnel who fled over the border on a helicopter during an attempted coup in their country.

All eight - six pilots and two engineers - were jailed for two months on charges of illegal entry into Greece, with the recognition of mitigating circumstances of having acted while under threat. The pilot of the helicopter was acquitted of an additional charge of violating flight regulations, and the other seven of being accomplices in the violation.

READ MORE: How Turkey crushed a coup after a night of violence

The sentence was suspended for three years, but they are being held in custody pending resolution of their asylum applications.

Turkey has demanded their return to stand trial for participation in Friday's coup attempt. The eight deny involvement and have applied for asylum, saying they fear for their safety amid widespread purges in Turkey in the aftermath of the attempted overthrow of the government.

The eight arrived at the court in handcuffs and with their heads covered by T-shirts in an attempt to protect their identities.

Their asylum applications are being examined, and they will appear before immigration authorities on July 27 for the second time for interviews.

READ MORE: Scots tourists hid in hotel as bullets flew during Turkey's attempted coup against President Erdogan

The eight landed at the airport of the north-eastern Greek city of Alexandroupolis early on Saturday in a Black Hawk helicopter after issuing a mayday signal and requesting permission for an emergency landing, which was granted.

During Thursday's court proceedings, all testified that they were crew members of three helicopters and had been unaware that a coup attempt was under way. They said they had been tasked with transporting wounded soldiers and civilians and that their helicopters had come under fire from police and others on the ground.

They said they landed at a military base near a hospital and came under fire again, and were told by their unit not to return to their home base because the situation was too dangerous. After heading to another location, the personnel decided to flee for their lives in one helicopter, they said.

The eight spent the night in a clearing in woodland, where they found out from the internet on mobile phones that an attempted coup had taken place and anyone in military uniform was being detained.

READ MORE: How Turkey crushed a coup after a night of violence

After debating on whether to flee to Bulgaria, Romania or Greece, they decided on the latter.

A Greek policeman also testifying in the trial said all eight were unarmed and co-operative after landing, offered no resistance to arrest, surrendered immediately and asked for political asylum.