9.  The applicant was born in 1967 and lives in Sofia. 10.  During the relevant period the applicant, who was addicted to drugs, was charged with numerous counts of theft. The charges concerned thefts of electric appliances, small amounts of money, small religious ceremonial objects, food, cigarettes and objects of higher value, such as icons and antiquities. More than twenty separate investigations were launched in relation to those thefts. Some of the investigations were initially instituted against an unknown perpetrator whereas in others the applicant, either alone or together with other persons, was named as the suspected perpetrator from the outset. 11.  In the course of the ensuing criminal proceedings the investigations were grouped. Two sets of such grouped proceedings are relevant to the present application: one concerning petty thefts and the second concerning icons and antiquities. 12.  These included eight investigations and four summary investigations, instituted between 1993 and 1996. The applicant was charged for the first time on 26 October 1993 in respect of one of the investigations. Later charges were brought in the remainder and eventually the twelve files were joined. 13.  During the investigation, between 1993 and 1996, the applicant and other suspected or accused persons were interrogated numerous times, forty‑four witnesses were questioned, fifteen on-site visits were made, nine searches were undertaken and numerous expert reports were commissioned and examined (psychiatric reports, finger-print reports and accounting reports). 14.  Approximately one third of these acts of investigation concerned charges under which the applicant was eventually convicted. The remainder concerned charges in respect of which the applicant was later acquitted. 15.  On 27 October 1994 the competent prosecutor referred the case back to the investigator as there had been irregularities and discrepancies. The investigator concluded his work on 15 June 1995. 16.  On 20 February 1996 the Sofia Prosecutor’s Office submitted an indictment to the Sofia District Court. 17.  On 18 March 1996 the Sofia District Court, noting that there had been breaches of procedural rules and discrepancies as regards the value of some of the stolen objects, referred the case back to the prosecutor. 18.  On 20 February 1997 the prosecutor submitted a fresh indictment. 19.  On 28 February 1997 the District Court, noting that some of the defects of the indictment had not been remedied despite the instructions given in the decision of 18 March 1996 and pointing to other discrepancies, referred the case back to the prosecutor. 20.  On 22 January 1998 the prosecutor again submitted an indictment. 21.  On 6 February 1998 the Sofia District Court, noting that certain procedural rules concerning the modification of the charges had not been observed, referred the case back to the prosecutor once more. 22.  The final version of the indictment was submitted on 19 February 1998. It concerned sixteen counts of theft allegedly committed by the applicant and two other persons. 23.  Throughout the judicial proceedings the applicant and his lawyer regularly appeared when summoned and did not cause any of the adjournments. 24.  The first hearing was held on 13 May 1998. The court noted that one of the co-accused persons was not legally represented whereas legal representation was mandatory in view of the contradictory interests of the three accused persons. As a result, the hearing was adjourned. 25.  It resumed on 10 June 1998 but had to be adjourned as one of the accused persons had not appeared. The court ordered his arrest. 26.  On 14 July 1998 the hearing proceeded with the questioning of the three accused persons. Several experts and witnesses were also heard. As some of the witnesses had not appeared, the case was adjourned. 27.  At the next hearing, held on 12 October 1998, several witnesses were heard. Others had not appeared, which necessitated an adjournment. 28.  The hearing scheduled for 10 November 1998 could not proceed as one of the applicant’s co-accused was ill. 29.  When the hearing resumed on 7 December 1998 several witnesses were heard but an adjournment was again necessary as other witnesses had not appeared. 30.  The next hearing took place on 11 February 1999. Several witnesses were heard. The failure of one witness to appear prompted another adjournment. 31.  Throughout the relevant period the Sofia District Court sought police assistance for the establishment of the addresses of witnesses. 32.  On 29 March 1999, at the last hearing, the Sofia District Court acquitted the applicant on nine of the charges and convicted him on the remaining seven. He was sentenced to three years’ imprisonment, suspended. 33.  On 27 April 1999 the applicant appealed to the Sofia City Court. 34.  The Sofia City Court listed a hearing for 13 December 1999 which, however, could not proceed as one of the accused persons did not appear. 35.  The hearing took place on 10 April 2000. 36.  On 12 June 2000 the Sofia City Court delivered its judgment. It accepted the applicant’s argument that the case should be treated as one concerning a continuing criminal activity and modified the conviction accordingly while upholding the sentence. 37.  This second group of proceedings commenced on 26 November 1992 when the applicant was arrested and charged with theft. Other files, concerning separate thefts were opened between 1992 and 1995. The applicant was charged with having stolen icons and antiquities. 38.  During the preliminary investigation ten files concerning separate thefts were joined. Eventually, however, the indictment only concerned four thefts, the other charges having been dropped. 39.  Some of the investigations launched in 1992, 1993 and 1994 were suspended soon after their beginning as the perpetrators were unknown at the time. They resumed in 1996, when the applicant and other persons were charged. 40.  In the course of the investigations many witnesses were heard, several accused persons, including the applicant were questioned, on-site visits and searches were made and expert reports were commissioned and examined. Apparently, only a part of those investigation acts concerned charges eventually retained. According to the applicant, the relevant investigation activity was limited to the questioning of eleven witnesses, three confrontations, six expert reports, four on-site visits and one search. 41.  On 13 March 1997 the investigator completed his work and submitted the file to the competent prosecutor. 42.  On 23 April 1997 the prosecutor ordered additional investigation. Those were finalised on 1 August 1997. 43.  After having decided to drop one of the charges, on 10 December 1997 the prosecutor again referred the case back to the investigator who complied with the instructions and submitted a revised report on 19 March 1998. 44.  On 26 June 1998 the prosecutor submitted an indictment to the Sofia City Court against three accused persons, including the applicant. 45.  Throughout the judicial proceedings before the Sofia City Court the applicant and his lawyer regularly appeared when summoned and did not cause any of the adjournments. 46.  The first hearing before the Sofia City Court, acting as a trial court, was listed for 13 November 1998 but could not proceed as one of the accused persons had not been summoned. 47.  On 10 December 1998 and 13 January 1999 the trial could not begin as no ex officio lawyer had appeared for one of the accused, despite the court’s repeated requests to the Sofia Bar. 48.  The hearing scheduled for 9 March 1999 could not proceed as one of the accused persons could not be brought from prison owing to his ill health. 49.  The trial eventually began on 5 May 1999. On that day the Sofia City Court heard the accused persons and the witnesses who had appeared. As some of the witnesses had not shown up, the hearing was adjourned until 15 June 1999. 50.  On that day another adjournment was ordered as certain witnesses and experts had not appeared. 51.  The hearing could not proceed on 13 October 1999 as one of the accused persons, a prisoner, was not brought to the courtroom: the Minister of Justice had imposed a five-day ban on transfers of prisoners in view of municipal elections during that period. 52.  On 12 November and 13 December 1999 the hearing was again adjourned as the lawyers of two of the accused persons had not appeared, apparently owing to ill health. 53.  Throughout the relevant period the Sofia City Court sought police assistance for the establishment of the addresses of witnesses. 54.  The last hearing took place on 23 December 1999. On that day the Sofia City Court convicted the applicant in respect of three thefts and acquitted him in respect of the fourth alleged theft. He was sentenced to ten years’ imprisonment. The two other accused persons were also convicted and sentenced to terms of imprisonment. 55.  Both the applicant and the prosecution appealed to the Sofia Appellate Court. 56.  The applicant’s whereabouts were unknown until 15 December 2000 when he was arrested on new charges, unrelated to the present case. As a result of the applicant’s address being unknown, the Sofia Appellate Court could not proceed with the case until January 2001. 57.  A hearing was listed for 30 March 2001 but was adjourned as one of the other accused persons was not legally represented. It appears that he was unable to continue paying his lawyer, which necessitated the appointment of an ex officio counsel and therefore an adjournment. 58.  On an unspecified date in 2001 the Sofia Appellate Court held a hearing which was however adjourned as the report on the value of the stolen objects had not been submitted. 59.  On 8 March 2002, having received the experts’ opinion that the value of the icons could not be determined, the Sofia Appellate Court set aside the judgment of the Sofia City Court of 23 December 1999 and referred the case to the preliminary investigation stage of the proceedings. The Appellate Court found, inter alia, that there had been a number of discrepancies concerning the value of the stolen objects which affected the legal characterisation of the charges, that the lower court’s judgment had not provided sufficient reasoning and that it had relied on inadmissible evidence. 60.  As of 27 March 2002, the date of the latest information received from the parties in relation to the icons and antiquities case, the proceedings were pending at the investigation stage. 61.  On 26 November 1992 the applicant was arrested and remanded in custody on one of the charges which eventually resulted in the criminal case concerning thefts of icons and antiquities. On 11 January 1993 the applicant was released on bail. 62.  On 26 October 1993 the applicant was arrested and detained pending trial in relation to the group of case files which eventually resulted in the petty thefts case against him. On 8 April 1994 he was released on bail. 63.  On 5 August 1994 the applicant was again arrested in relation to the petty thefts set of case files, brought before an investigator or a prosecutor, charged with additional counts of theft and placed under pre-trial detention. 64.  On 17 October 1994 the applicant’s petition for release was dismissed by a prosecutor. 65.  On 5 January 1995 another petition for release was dismissed on grounds that the applicant was suspected of having committed offences after his release on 8 April 1994 and that therefore there existed a danger of re‑offending. 66.  On 27 August 1996 a request for release submitted by the applicant was dismissed by a district prosecutor. That decision was upheld on 23 September 1996 by a regional prosecutor. The applicant’s ensuing appeal was dismissed on 9 October 1996 by the Chief Public Prosecutor’s Office. The decision stated, inter alia, that the applicant was charged with numerous serious crimes and that there were other criminal proceedings pending against him. Therefore, his detention was mandatory under Article 152 § 3 of the Code of Criminal Procedure. 67.  According to the applicant, on 11 March and again on 24 April 1997 he submitted to the Sofia District Court, through the prison administration, appeals against his detention. The applicant stated that he had obtained registration numbers under the outgoing correspondence register of the prison but had never been notified of any examination or decision on his appeals. According to the Government, there was no evidence supporting the applicant’s statement that he had submitted appeals in March and April 1997 68.  On 12 August 1997 the applicant appealed to the Sofia District Court against his pre-trial detention. He relied, inter alia, on a legislative amendment, in force since 12 August 1997, according to which pre-trial detention pending the preliminary investigation could not exceed one or two years, depending on the gravity of the charges. 69.  The District Court held a hearing on 25 September 1997 and ordered the applicant’s unconditional release. The District Court stated, inter alia, that the applicant had been diagnosed as suffering from addiction to drugs and was in need of medical treatment. Furthermore, all evidence in the case had been collected. 70.  Despite the District Court’s decision of 25 September 1997 the applicant was only released on 23 October 1997 owing to a misunderstanding concerning the different cases pending against him. 71.  In particular, during a certain period of time, the petty thefts case had been dealt with under investigation file number 965/94. The applicant’s initial detention order of 5 August 1994 carried that reference. When later another file, no. 415A/96, had been added to the set, the latter number had become the number of the joint file. In his appeal to the District Court of 12 August 1997 the applicant had referred to file number 415A/96, which also figured in the District Court’s decision of 25 September 1997 ordering his release. 72.  That decision was transmitted to the prison administration on 25 September 1997. The prison administration, apparently noting that there existed a detention order under investigation case number 965/94 and considering that that was a separate case, concluded that the applicant should remain in pre-trial detention. No written document was issued in this respect. 73.  On 17 October 1997 the applicant submitted a complaint to the District Court stating that he was still in detention. He also stated that the two file numbers concerned the same case. The complaint was registered at the District Court on 21 October 1997. 74.  On 23 October 1997 the District Court wrote to the prison administration clarifying the matter. The applicant was released on the same day. 75.  On an unspecified date in 1997 the applicant, assisted by a lawyer, brought before the Sofia City Court a civil action against the prosecuting authorities and the Sofia District Court claiming non-pecuniary damages for his allegedly unlawful detention between 16 August 1997, the date by which his appeal of 12 August 1997 should have been decided in accordance with the statutory three-day time-limit, and 23 October 1997, the date on which he was released. 76.  After several hearings, on 14 May 2001 the Sofia City Court reserved judgment. 77.  By judgment of 27 February 2003 the Sofia City Court dismissed the applicant’s claims on grounds that the period of his pre-trial detention had been deducted from the term of imprisonment to which he had been sentenced and that no compensation for non-pecuniary damage was due in such circumstances. The applicant appealed. 78.  On 24 March 2004 the Sofia Appellate Court partly upheld the lower court’s judgment, quashed it for the remainder and decided on the merits. 79.  The Appellate Court noted that the fact that the applicant’s request for release filed on 12 August 1997 had not been examined until 25 September 1997 was in violation of domestic law. Nevertheless, the court considered that it was not possible to speculate whether or not his release would have been ordered had his application been examined before 25 September 1997. For these reasons, the court upheld the City Court’s judgment dismissing the applicant’s claims for the period between 16 August and 25 September 1997. 80.  The Appellate Court found, however, that from 26 September until the applicant’s release on 23 October 1997 his detention had not been based on any legal ground. The court did not accept the reasoning of the Sofia City Court as regards the deduction of the time spent by the applicant in detention, since that deduction had been made from a suspended sentence and, therefore, the applicant had not benefited from a shorter stay in prison. On that basis the Appellate Court ordered the Prosecutor’s Office, the body in charge of supervising the enforcement of pre-trial detention orders, to pay to the applicant 500 Bulgarian levs (“BGN”) in non-pecuniary damages for his unlawful detention between 26 September 1997 and 23 October 1997. Since the applicant’s claim had been for BGN 7,000 and he owed court fees in an amount proportionate to the dismissed part of his claims, the applicant was ordered to pay BGN 260 in court fees. The applicant was thus eventually entitled to BGN 240 in compensation (the equivalent of about EUR 120). 81.  The applicant filed a cassation appeal with the Supreme Court of Cassation. As of July 2004 the proceedings were pending.