An Egyptian author on Thursday walked out of a Cairo police station after a court suspended his two-year prison sentence pending review of his appeal on obscenity charges.

The year-long case of Ahmed Naji, after a magazine published a sexually explicit excerpt of his novel, The Use of Life, has drawn international condemnation and accusations of a crackdown on freedom of expression.

Prosecutors said Naji “violated public modesty”.

It was seen as part of a larger crackdown on civil rights in Egypt under the rule of army chief-turned-President Abdel Fattah el-Sisi.

Surrounded by his friends, Naji was rushed into a car with tinted windows and made no comments to reporters.

Writing on Twitter, Ramy Yacoub, deputy director of The Tahrir Institute for the Middle East, said Naji “opted not to be photographed once he left the police station” and he would “drive him home safely”.

Naji was initially acquitted, but prosecutors appealed and a higher court in February sentenced him to two years in prison.

A court on January 1 will either decide to order another trial or send Naji back to prison.

Cairo-based literary critic Marcia Lynx Qualey told Al Jazeera: “Naji’s imprisonment, like the closure of the Karama libraries, is terrible evidence of the narrowing space for public laughter, creativity, art, reading.

“As we pass the days until his appeal, we must continue to demand the space for his freedom.”

In November, two Al Karama community libraries in Cairo, founded by human rights activist Gamal Eid, were closed by authorities.