CAIRO -- Egyptian author Ahmed Naji was sentenced to two years in jail on Saturday by a Cairo appeals court for publishing a sexually explicit excerpt of his novel that prosecutors said violated "public modesty."

It was the latest in a series of rulings against artistic works or speech deemed offensive to Islam or values in the overwhelmingly conservative country. The spike in such cases has taken place under the rule of President Abdel-Fattah el-Sissi, who overthrew an Islamist president and has called for religious reforms to combat extremism.

Mahmoud Othman, a lawyer representing Naji, said his client was taken into police custody after the hearing. The court also ordered the editor-in-chief of Egypt's top literary magazine, Tarek el-Taher, to pay a 10,000-Egyptian pound ($1,277) fine for publishing the excerpt, according to Othman.

The trial stems from a complaint filed by a private citizen and taken up by the prosecution after Akhbar al-Adab magazine published an excerpt from Naji's novel, "The Use of Life," in August 2014. The excerpt contains explicit descriptions of sexual acts and hashish use by the characters.

Defence lawyers say the lawsuit was originally filed by a citizen who said his heartbeat fluctuated, his blood pressure dropped and he became severely ill upon reading the excerpt. The prosecution insisted the excerpt be treated as a work of journalism and not fiction.

Naji was initially acquitted, but after the case garnered widespread media coverage, prosecutors appealed the verdict, and in the latest ruling he received the maximum penalty.

He is not the first author to face legal troubles in Egypt.

Fatma Naoot last month appealed a three-year sentence after she was found guilty of contempt for Islam over a Facebook post criticizing the slaughter of animals for the Muslim feast of Eid al-Adha.

Last December, a court of appeals confirmed a prison term for a former TV host and researcher on Islamic heritage, Islam Behery, who was convicted of "defaming religious symbols" and Muslim scholars after he called for the removal of passages from religious texts which he said supported extremism. The court reduced his prison term to one year from an initial five-year sentence.

Gamal Eid, a prominent human rights lawyer, said the current crackdown on expression, especially when it comes to religion and morals, is the worst he's seen in 30 years. "What is worse than an extremist is a state employee when he one-ups the extremist," he said.

Egypt has carried out a sweeping crackdown on dissent expressed by both Islamists and secular activists since el-Sissi overthrew Mohammed Morsi, Egypt's first freely elected president, amid massive protests against his yearlong rule. Thousands of mainly Islamist dissidents have been jailed, and all unauthorized protests have been banned.

Authorities may be cracking down on artistic expression to insulate themselves from criticism by Islamists, according to rights lawyers and other experts. Egypt is a conservative country, and one where any perceived criticism of religion can ignite public outrage.

Naji's defence team can appeal the verdict at the cassation court, which looks into the procedures of the case. His lawyers say they are still debating their next move.

They have argued that the law in question, which prohibits publishing anything that "violates public modesty," is unconstitutional. Egypt's constitution states that artists, writers, and other creative individuals should not be imprisoned for their work. Naji said his book, which was printed in Beirut, was approved by Egyptian censors, and has been available in local bookstores.

His lawyers also argued the individual who filed the case wasn't directly harmed by the excerpt and therefore didn't have the legal right to file the lawsuit.