CAIRO (Reuters) - Egypt's highest court on Sunday ordered the freeing of an author who was jailed for public indecency when extracts from his sexually explicit novel were published in a literary newspaper, his lawyer said.

A chapter from Ahmed Naji's novel Istikhdam al-Hayat, or Using Life, was serialized in a state-owned literary publication and a case was brought against him last year by a private citizen who claimed it had caused him distress including heart palpitations.

Naji was initially acquitted in January this year but the prosecution appealed against that ruling and he was sentenced to two years in prison in a February retrial.

The sentence was viewed by fellow authors, journalists, and human rights activists as an affront to freedom of expression and his lawyers appealed.

The Court of Cassation temporarily suspended Naji's sentence on Sunday but banned him from travel and scheduled another hearing for Jan. 1, lawyer Negad al-Borai told Reuters.

Naji has not been released yet but it is expected he will get out of prison later on Sunday, Borai said.

The court will determine on Jan. 1 whether to accept his appeal - setting in motion a second and final retrial - or reject it and send him back to prison.

(Reporting by Ahmed Aboulenein; Editing by Andrew Bolton)