Police arrested 28 people in June at an Ankara protest against the death of a retired teacher who suffered a heart attack when police fired pepper spray at a demonstration against the prime minister in the Black Sea town of Hopa a few days before.

Police raided their houses and found left-wing tracts and pictures of executed Turkish leftists. While no weapons were found, police seized a broken umbrella as evidence, media said.

Prosecutors charged 22 of them with crimes ranging from "membership of a terrorist organization", to "committing crimes in the name of a terrorist organization."

Hundreds of protesters gathered outside the Ankara court on Friday for the first hearing of their case. After a 12-hour hearing, the judge ordered the 22 freed on bail and demanded the files of an investigation by prosecutors into whether the accused had been tortured in custody.