Mr Tissainayagam was arrested in March 2008
A Sri Lankan journal editor jailed for 20 years has left prison for the first time since March 2008 after a court ordered him to be freed on bail.
JS Tissainayagam, a Tamil, won his liberty at the Court of Appeal on Wednesday morning. He denies publishing articles aimed at inciting violence.
His lawyer, MA Sumantharan, told the BBC that bail had been set at 50,000 Sri Lankan rupees ($440).
Mr Tissainayagam also had to surrender his passport.
Mr Sumantharan said he expected his client to remain out of prison until an appeal against his conviction is heard.
The BBC's Charles Haviland in Colombo says that is a process which is likely to take place in two years time - unless expedited by the attorney-general.
The government has said no presidential pardon can be granted until all appeals have been exhausted. But Mr Sumantharan said that in fact, according to the constitution, such a pardon can be granted at any time.
Mr Tissainayagam belongs to the Tamil minority and used to edit a regional magazine, the North-Eastern Monthly.
He was arrested in March 2008 and convicted last August on two counts under the Prevention of Terrorism Act and one under Sri Lanka's continuing emergency regulations.
The indictment said he had conspired to cause ethnic violence through his articles in the magazine.
The journalist has always said he does not believe in violence. One of the pieces, published in 2006, accused the government of shelling an eastern town and trying to drive out its population during fighting taking place at the time.
Campaigners say that journalists are increasingly in danger
An international lobby group, the Committee to Protect Journalists, on Tuesday urged President Mahinda Rajapaksa to grant a pardon and annul the prison sentence of 20 years in jail with hard labour.
Mr Tissainayagam's sentence was the harshest given to a Sri Lankan journalist in recent years.
He was found guilty of "causing communal disharmony" and was one of a handful of journalists mentioned last May by US President Barack Obama, who called them "emblematic examples" of reporters jailed for their work.
The Sri Lankan government said Mr Obama had been misinformed.
In May 2008 Sri Lanka defeated Tamil Tiger rebels fighting for a separate homeland for the ethnic Tamil minority.
It is estimated that more than 70,000 people were killed during the 26-year conflict.