In his white prison uniform, Sherif Farag was forced to present his thesis behind bars where he spent months without trial, a procedure Egypt's government is accused of using to silence its opponents.
Farag, a lecturer's assistant at Alexandria University, had been accused of inciting violence that led to the deaths of 34 people, and of belonging to the banned Muslim Brotherhood.
The fate of detainees like him has raised concerns about human rights abuses in Egypt, an issue US Secretary of State John Kerry said he had "frank" talks about in Cairo at the weekend.
Scores have been arrested as part of a crackdown waged since July 2013 when the army deposed Egypt's first freely-elected president, the Islamist Mohamed Morsi.
For Farag, preventive detention has been used as a form of "punishment" since law amendments in September 2013 allowed the authorities to extend custody indefinitely.
Prosecutors alleged Farag took part in clashes in August 2013 between security forces and Islamist protesters outraged by a crackdown on Morsi supporters that killed hundreds.
"The only connection I had with these events was watching them on television," Farag told AFP.
"The state turned me into a criminal and murderer on paper, without any evidence," he said. "It's oppressing and humiliating to be locked up for eight months for no reason."
Farag, whose detention was extended despite documents proving he had "no connection" with the violence, was finally cleared of all charges on 29 July.
The ongoing crackdown has left at least 1,400 people dead and seen over 15,000 arrested, many of them held for breaking another new law prohibiting all but police-sanctioned demonstrations.
Among them are secular activists who led the 2011 popular uprising that ousted longtime autocrat Hosni Mubarak.
A symbol of that uprising was Alaa Abdel Fattah, who demanded the scrapping of the protest law used to crush "any opposition against the current regime" after his release this week following months in detention.
'Not a legal procedure'
Lawyers say the procedure used against Farag has been repeated in many cases, although on Wednesday the prosecution said it had released 116 students from preventive detention.
"The previous version of the law restricted preventive detention to a maximum of six months, after which a suspect was either released or referred to trial," said rights lawyer Gamal Eid.
But two months after Morsi's ouster, then interim president Adly Mansour amended the law "authorising unlimited preventive detention," said Eid.
"Detentions of those arrested now get extended without any time limit under the pretext of ongoing investigations," he said, adding that the "state replaced the state of emergency with preventive detention".
Despite his freedom, Farag said he is still concerned he could be rearrested for being outspoken about issues concerning Alexandria.
"Preventive detention has been turned into a punishment in itself against the opposition," said Ramy Said, a researcher at the Egyptian Initiative for Personal Rights who is also Farag's lawyer.
Prosecutors had alternatives, like the imposition of travel bans, but they refrain from using them in order to "crush the opposition," he added.
No compensation for injustice
Egyptian photojournalist Mahmoud Abdelshakour, also widely known as Shawkan, has also been in preventive detention since police cleared two pro-Morsi camps in Cairo on 14 August last year.
"My client was doing his job as a journalist during the dispersal… but nobody cares to check," said lawyer Aly Abdel Fattah.
Abdelshakour's brother Mohamed said the cameraman "has turned into a depressed, broken human being who suffers from tremendous psychological pain.
"Preventive detention is stealing my brother away from me."
On 2 September the detention of Abdelshakour, an employee for the London-based Demotix photo news agency, was renewed by another 45 days.
While the prosecutor general's spokesman has declined to comment, a senior official in the prosecution service admitted there were problems with extended preventive detentions.
"The number of violent clashes being investigated is vast, and so it takes a long time," the official told AFP on condition of anonymity, acknowledging that some of those in jail could be there by "mistake".
Egypt's constitution allows detainees against whom charges have been dropped to seek compensation for the time spent in preventive detention.
But the prosecution official said despite this, there was still no law that regulates such compensation.
"Money cannot compensate me for my false imprisonment and the feeling of injustice," said Farag.