5.  On 19 November 1996 the applicant was arrested and detained on suspicion of committing an offence. On 22 November 1996 he was charged with seven counts of theft, one count of attempted theft and one count of robbery. Most of the charges concerned offences committed jointly with others. He remained in custody until 30 September 1997, when he was released on bail. 6.  In June 1998 the Sofia District Prosecutor’s Office indicted the applicant, Mr V.S. and Mr D.D. in relation to four thefts and one robbery. On an unspecified date one of the victims of the offences joined the proceedings as a civil claimant. 7.  After a trial, in a judgment of 7 December 1998 the Sofia District Court found the applicant guilty as charged, sentenced him to three years’ imprisonment, and ordered him to pay damages to the civil claimant. The court did not make an order for the applicant’s detention pending appeal. It did not immediately give the reasons for its judgment; they were made available in October 1999. 8.  On 5 January 1999 the applicant’s counsel appealed to the Sofia City Court. Since at that point she did not yet have the reasons for the Sofia District Court’s judgment, she submitted in general that the applicant’s conviction was unlawful and unfounded and asked it to be quashed. She also argued that his sentence was excessive and requested that it be revoked or suspended. She said that she would provide further particulars and indicate the evidence to be gathered as soon as the reasons for the Sofia District Court’s judgment became available. As required under Article 318 § 2 of the 1974 Code of Criminal Procedure, the appeal was lodged through the Sofia District Court. 9.  On 17 February 1999 the Sofia District Court briefly noted that the appeal did not meet the requirements of Article 319 of the Code and, without indicating the specific deficiencies, directed the applicant to submit a rectified appeal within seven days. The applicant was notified of the court’s ruling on 20 April 1999, but did not react. Accordingly, in a decision of 10 May 1999 the Sofia District Court dismissed the appeal. Neither the applicant, nor his counsel was notified of this and did not seek to appeal against this decision. 10.  In line with Article 371 §§ 1 and 2 (3) of the Code (see paragraph 24 below), upon the expiry of the fifteen-day time-limit for appealing against the decision of 10 May 1999 the applicant’s conviction and sentence were considered final and therefore enforceable. On 30 November 1999 he was detained in Sofia Prison for the purpose of serving his sentence. 11.  On 20 December 1999 the applicant’s counsel appealed to the Sofia City Court against the Sofia District Court’s decision of 10 May 1999. She argued that the appeal against the applicant’s conviction and sentence had been in line with all legal requirements. She stressed that the applicant had not been required to give detailed grounds of appeal, as the Sofia District Court had not made available the reasons for its judgment within the time‑limit for lodging an appeal. Finally, she asked the court to rule rapidly, as the applicant was in custody serving his sentence. 12.  On 2 February 2000 the Sofia District Court sent this appeal to the Sofia City Court. 13.  Two hearings listed by the Sofia City Court on 20 March and 22 May 2000 respectively were adjourned: the first because the applicant had not been properly summoned and, although legally represented, did not appear in person, and the second because his co-accused and the civil claimant, despite being duly summoned, failed to attend. 14.  At a hearing which took place on 17 July 2000 the Sofia City Court found that there was no need to involve the applicant’s co‑accused and the civil claimant in the proceedings relating to the propriety of the Sofia District Court’s decision to dismiss his appeal against conviction and sentence. It further held that this appeal had been in line with legal requirements and that the Sofia District Court had erred by dismissing it. Moreover, its decision to do so did not indicate in what respects the appeal had been deficient. The court therefore quashed this decision and referred the case back to the Sofia District Court for further consideration of the appeal against the conviction and sentence. With that the criminal proceedings against the applicant were restored and his conviction and sentence were no longer considered final. 15.  According to the applicant, at the same hearing his counsel asked the Sofia City Court to consider whether he should remain in custody or be released. The court declined to do so, saying that it was for the Sofia District Court to decide on this matter. 16.  After 17 July 2000 the applicant’s counsel filed with the Sofia District Court and the Sofia District Prosecutor’s Office several requests for release, none of which was examined. 17.  The applicant’s counsel also met three times with the president of the Sofia District Court, who explained that the judge to whom the case had been assigned was absent. On 5 October 2000 the applicant’s counsel filed a complaint with the Supreme Judicial Council, but received no reply. 18.  On 3 October 2000 the Sofia District Court sent the case file to the Sofia City Court. 19.  On 24 October 2000 the Sofia City Court set the applicant’s appeal down for examination. Apparently, at this point the president of the panel to which the case had been assigned noticed that the applicant was still in custody. For this reason, on the next day, 25 October 2000, she alerted the Sofia District Prosecutor’s Office that, following the decision of 17 July 2000 (see paragraph 14 above), the applicant’s conviction and sentence were no longer considered final, and that he could not be kept in custody pursuant to them. On the same day the Sofia District Prosecutor’s Office ordered the applicant’s release, citing the same reasons. 20.  On 26 October 2000 this order was received by the Sofia Prison and the applicant was set free. It appears that until the end of the criminal proceedings against him the applicant was not further remanded in custody. 21.  In a judgment of 27 March 2001 the Sofia City Court acquitted the applicant of the charges concerning two of the thefts and upheld the remainder of the Sofia District Court’s judgment. It imposed a global sentence of one and a half years’ imprisonment. In determining the length of the applicant’s period of imprisonment in pursuance of this sentence it deducted, by reference to Article 59 of the 1968 Criminal Code (see paragraph 30 below), the time he had already spent in custody between 30 November 1999 and 26 October 2000, saying that during this period the applicant had been serving a sentence which had not yet been made final. 22.  The applicant lodged an appeal on points of law. 23.  After holding a hearing on 19 November 2001, in a final judgment of 26 November 2001 the Supreme Court of Cassation upheld the Sofia City Court’s judgment.