4.  The applicant was born in 1970 and lives in Chełm. 5.  On 9 March 2004 the applicant was arrested on suspicion of drug dealing and uttering threats while acting in an organised criminal gang. On 11 March 2004 the Lublin District Court decided to place the applicant in pre-trial detention. The court held that there was a strong likelihood that the applicant committed the offences with which he was charged. 6.  On 1 June 2004 the Chełm District Court extended the applicant’s detention. In addition to the grounds originally given, the court relied on the likelihood that a severe sentence would be imposed on the applicant and the probability that he would interfere with the course of the proceedings. On 1 September 2004 the Chełm District Court again extended the applicant’s detention, relying on the complexity of the investigation. 7.  Between 3 and 17 February 2005 the applicant served a prison sentence which had been imposed on him in another set of criminal proceedings. 8.  On 28 February 2005 a bill of indictment was filed with the Chełm District Court. The applicant was charged with drug dealing and uttering threats while acting in an organised criminal gang. 9.  The first hearing was held on 6 June 2005. Subsequent hearings were held at regular intervals of one month. On many occasions the trial court imposed fines on witnesses for failure to appear at hearings. In addition, some of the witnesses were brought to the court under police escort. 10.  The applicant’s detention was subsequently extended on several occasions, in particular on 7 March, 7 June, 5 September and 5 December 2005. 11.  Between 21 March 2005 and 21 May 2006 the applicant served two different prison sentences which had been imposed on him in another set of criminal proceedings. On 21 May 2006 the applicant began serving a prison sentence of nine years and six months. 12.  On 5 June 2006 the Chełm District Court again extended the applicant’s detention. 13.  On 24 July 2006 the Chełm District Regional Court convicted the applicant as charged and sentenced him to ten years’ imprisonment and a fine. The applicant appealed. 14.  On 13 February 2007 the Lublin Regional Court gave judgment, partly quashing and remitting the District Court’s judgment (in respect of one of the charges). 15.  On 7 May 2007 the Chełm District Court again extended the applicant’s detention. 16.  On 7 August 2007 the Chełm District Court gave a decision and discontinued the applicant’s pre-trial detention. 17.  According to the information available to the Court at the date of adoption of the present judgment, the criminal proceedings concerning one of the charges against the applicant are still pending before the Chełm District Court. 18.  On 25 July 2005 the applicant lodged a complaint under section 5 of the Law of 17 June 2004 on complaints about a breach of the right to a trial within a reasonable time (Ustawa o skardze na naruszenie prawa strony do rozpoznania sprawy w postępowaniu sądowym bez nieuzasadnionej zwłoki) (“the 2004 Act”). 19.  It was dismissed by the Lublin Regional Court on 25 July 2007. The court stressed that the proceedings had been very complex, that they had concerned ten co-accused and that evidence had to be obtained from twenty three witnesses.