7.  On the night of 2 December 1997 a customer of a bar was brutally beaten up after leaving with a friend to go home. The friend who accompanied him witnessed the start of the attack from a distance. The victim later died from his injuries. 8.  A preliminary investigation into the murder was opened on the following day. 9.  On 11 December 1997 the applicant, who had also been in the bar on the night in question, was arrested and questioned by the police. He signed a statement confessing to having beaten the victim, which he subsequently retracted claiming that it was extracted from him under duress. 10.  On 12 December 1997 the applicant was charged with murder and detained on remand. Immediately thereafter, the applicant was questioned by an investigator. In the presence of a State-appointed attorney and after having been informed of his right not to give testimony the applicant reiterated the statement he had given on the previous day and made a full confession. 11.  During the preliminary investigation various witnesses were questioned, DNA tests were performed on the applicant's clothes and a crime scene experiment was conducted. Various experts' opinions were also obtained, such as to assess the applicant's physical and mental state, as well as his eyesight. A medical examination of the victim was also conducted. In addition, an agronomical expertise was commissioned to determine what the foliage cover of the trees was at the time of the murder and whether that could have impaired the witness's line of sight. A meteorological expertise was also obtained to assess whether the weather could have had a similar hampering effect. 12.  On an unspecified date, the Prosecutor's Office filed an indictment for murder against the applicant with the Plovdiv Regional Court. 13.  Subsequently, the Plovdiv Regional Court remitted the case back to the investigation stage on at least two occasions. 14.  Revised indictments were entered against the applicant on 13 January and 14 October 1999. The final indictment against the applicant was for murder with extreme viciousness. The prosecution claimed that the applicant had beaten up the victim after he had refused to lend him money to pay his bill in the bar. 15.  The Plovdiv Regional Court conducted six hearings between 30 January and 3 December 2001. 16.  In a judgment of 3 December 2001 the Plovdiv Regional Court, acting as the court of first instance, acquitted the applicant. According to the minutes, it then ordered his release, but imposed a restriction on him not to leave his place of residence without the permission of the Prosecutor's Office. The court considered that it was unclear whether the applicant's confession was given voluntarily. Assessing it in the light of the other evidence and witnesses' statements, the court found that the prosecution had failed to prove its case against the applicant. 17.  The Prosecutor's Office appealed against the judgment on 18 December 2001. 18.  It is unclear how many hearings were conducted before the Plovdiv Court of Appeals. 19.  In a judgment of 20 September 2004 the Plovdiv Court of Appeals quashed the lower-court's judgment and examined the case on the merits. It found the applicant guilty of murder with extreme viciousness, sentenced him to seventeen years' imprisonment and ordered that he pay damages to the victim's family. In reaching its decision, the Plovdiv Court of Appeals found that the first-instance court had given too much weight to the applicant's assertions that his confession had been extracted under duress, which it considered to be unsubstantiated. In addition, it found the applicant's version of the events on the night of the murder to be in contradiction with the other evidence in the case and to be in conflict with his actions on the next day when he tried to hide the clothes he had worn on the previous night and, subsequently, when he presented the police with other garments for examination. 20.  On an unspecified date the applicant filed a cassation appeal against the judgment. 21.  It is unclear whether and when the applicant's appeal was examined by the Supreme Court of Cassation. 22.  The applicant was arrested by the police on 11 December 1997 and questioned. 23.  On the next day, 12 December 1997, he was detained on remand by order of an investigator, which was confirmed by the Prosecutor's Office later on the same day. The applicant was assisted by a State-appointed attorney. The grounds for detaining him on remand, as stated in the decision of the investigator, were that “there is a danger that the charged may abscond or re-offend”. 24.  The applicant's detention was confirmed by a prosecutor on 11 May 1998 without citing any grounds. 25.  At the latest, the trial stage of the criminal proceedings against the applicant began on 14 October 1999. 26.  The applicant made several unsuccessful appeals against his detention. Information was provided only about some of them. 27.  The applicant's appeals dating from 18 June, 2 September and some time at the beginning of November 1999 were dismissed by the Plovdiv Regional Court on 13 July, 15 September and 5 November 1999, respectively. Separately, an appeal dated 16 September 1999 was rejected on the next day by a judge-rapporteur of the Plovdiv Regional Court because he found that it had been filed only one day after the court had ruled on a previous appeal and considered that there was a lack of new circumstances justifying a new right of appeal. 28.  In each of his appeals, the applicant petitioned for his release and argued that there was no risk that he would abscond, re-offend or obstruct the investigation, because he had a permanent address, had no prior criminal record, was the main breadwinner in the family, the financial and living conditions of his wife and children had worsened, the two-year maximum period of pre-trial detention under Section 152 § 4 of the Code of Criminal Procedure (“CCP”) was being violated and, in any case, that there was insufficient evidence that he had perpetrated the offence. 29.  In its decisions to dismiss the applicant's appeals the Plovdiv Regional Court found that there was a risk that the applicant might abscond, re-offend or obstruct the investigation essentially because he was charged with a serious intentional offence. In respect of the claimed violation of the two-year maximum period of pre-trial detention the court found that it had not been exceeded because that period concerned only detention pending the investigation stage of the proceedings and was not applicable to detention at the trial stage. 30.  The Plovdiv Regional Court explicitly refused to examine the specific evidence in the case as to whether there was a reasonable suspicion against the applicant. In its decision of 13 July 1999 it stated that “[t]he court does not find it necessary to consider the evidence in substance....” 31.  Similarly in its decision of 15 September 1999 it considered that “[t]he court cannot go into the specifics of the case and examine the collected evidence in the context of the [present] proceedings....” 32.  On an unspecified date in 2000 the applicant filed another appeal against his detention under the rules introduced on 1 January 2000. 33.  On 11 May 2000 the Plovdiv Court of Appeals dismissed the appeal, with reasoning similar to that contained in the previous decisions of the Plovdiv Regional Court. 34.  On 29 August 2001 the applicant appealed before the Supreme Court of Cassation against the aforementioned decision of the Plovdiv Court of Appeals of 11 May 2000. The basis for the appeal was paragraph 19 of the Amendments to the CCP promulgated on 27 April 2001. 35.  On 24 September 2001 the Supreme Court of Cassation refused to initiate cassation proceedings. It found that it was not competent to review the lawfulness of a detention at the trial stage. 36.  The applicant was released on 3 December 2001 by virtue of the judgment of the Plovdiv Regional Court.