ISTANBUL: A Turkish court on Friday ordered the immediate release of ex-military chief Ilker Basbug who was sentenced to life in prison last year for plotting to overthrow the Islamic-rooted government, his lawyer said.
The decision came a day after Turkey's top Constitutional Court ruled that Basbug's legal rights had been violated, saying that a lower court had failed to publish its detailed verdict on the case and send it to the appeals court.
"This verdict is significant," Basbug's lawyer Ilkay Sezer told reporters.
"I am happy on behalf of the law," he added.
Basbug was due to be released within hours.
The court imposed an overseas travel ban on the ex-commander, according to local media.
Basbug, who led the army between 2008 and 2010, has been held at the high-security Silivri prison near Istanbul for more than two years.
He was initially detained in 2012 before being sentenced to life in prison in August 2013, along with hundreds of other military officers who were given long jail terms for their roles in the so-called "Ergenekon" conspiracy to overthrow the government.
The 71-year-old general has always denied the charges.
The military, which sees itself as the guarantor of Turkey's secular principles, has carried out three coups -- in 1960, 1971 and 1980, -- and pressured an Islamist government to step down in 1997.
Prime Minister Recep Tayyip Erdogan has spent the best part of his 11 years in power trying to curb the military's influence.
But he has recently sought to get the army back on his side as he fights for political survival in a bitter feud with his ally-turned-opponent Fethullah Gulen, a Muslim cleric whom he accuses of instigating a graft scandal to topple him.
In a conciliatory gesture toward the army that further increases the chances of retrials for the hundreds of convicted officers, parliament in February abolished the specially appointed courts that tried them.
The constitutional court's ruling could set a precedent for more than 200 others jailed for their alleged roles in coup conspiracies.
"I hope the decision will set a precedent and other victims -- some suffering from grave health problems -- will be released immediately," Sezer said.
The mass coup trial, seen as a key test in Erdogan's showdown with secularist and military opponents, polarised the country, with critics denouncing it as a witch hunt to stifle dissenting voices.
An advisor to the prime minister has suggested that supporters of Gulen masterminded the trials against the military.
The influential Gulen movement was a key backer of Erdogan's Islamic-rooted Justice and Development Party (AKP) when it first came to power in 2002.
But the alliance shattered after December police raids which saw dozens of Erdogan's key business and political allies detained on corruption allegations.
The Turkish premier has accused followers of Gulen in the police and the judiciary of concocting the investigation to unseat his government in a crucial election year.
Gulen has lived in the eastern US state of Pennsylvania since he left Turkey in 1999 to escape prosecution on charges of "anti-secular activities".