The Constitutional Court on Thursday ruled in favor of a former army chief who was appealing the legality of his initial detention in 2012 in a case that resulted in his conviction and life sentence last year for plotting a coup against the government, according to a written statement posted on the court’s website. The ruling, which said that the rights of the former officer, Gen. Ilker Basbug, who served as military chief of staff from 2008 to 2010, had been violated, paved the way for his possible release from an Istanbul prison. The Constitutional Court said the lower court that held the five-year trial failed to publish its detailed reasoning for its verdict and send it to the appeals court, obstructing the defendant’s right to an appeal and violating a constitutional clause concerning personal freedom. The ruling could also be used as a precedent for the release of many of the more than 270 defendants who spent several years in prison before their convictions last year in the case known as the Ergenekon affair. The government’s prosecution of that case was seen as an effort to curb the role of Turkey’s military in politics, but it was also criticized for ensnaring people who were opponents of the government, including politicians, academics, journalists and writers.