5.  The applicant was born in 1974 and lives in Gdańsk.
6.  The applicant was arrested on 4 June 2004.
7.  On 5 June 2004 the Kartuzy District Court (Sąd Rejonowy) ordered that the applicant be detained until 4 September 2004 in order to secure the proper conduct of the proceedings and in view of the reasonable suspicion that he and other co-accused had committed the crime of harassment, deprivation of liberty and homicide.
8.  The applicant's detention was repeatedly extended by several decisions of the Kartuzy District Court, the Gdańsk Regional Court (Sąd Okręgowy) and subsequently the Gdańsk Court of Appeal (Sąd Apelacyjny). The applicant's appeals were unsuccessful. In their decisions, the courts relied on the reasonable suspicion that the applicant had committed the offence with which he had been charged, on the serious nature of the offence and on the complexity of the case.
9.  The applicant lodged three applications for release and for the preventive measure to be varied. On 14 October, 3 November and 3 December 2004 the Kartuzy District Prosecutor (Prokurator Rejonowy) refused to vary the preventive measure, relying on a reasonable suspicion that the applicant would obstruct the proper course of the proceedings.
10.  On 15 February 2005 a bill of indictment was lodged with the Gdańsk Regional Court. The applicant was charged with homicide, among other charges. The bill of indictment concerned four co-accused all of whom had been remanded in custody.
11.  On 27 April 2006 the Regional Court made an application under Article 263 § 4 of the Code of Criminal Procedure to the Gdańsk Court of Appeal for the applicant's detention to be extended until 31 July 2006, because the statutory two-year time-limit on detention pending trial would soon be exceeded (Article 263 § 3 of the Code of Criminal Procedure). It emphasised that the grounds originally given for his detention were still valid and that the court was not able to proceed with the hearing of evidence, for reasons beyond its control.
12.  On 4 May 2006 the Court of Appeal granted the Regional Court's application. The court relied on a strong suspicion that the applicant had committed the offences in question, which was supported by evidence from witnesses and experts. It attached importance to the seriousness of those offences and the likelihood of a severe sentence of imprisonment being imposed on the applicant. The court emphasised, however, that the trial court should take all necessary measures to organise the proceedings in a diligent manner so as to terminate the trial by 31 July 2006.
13.  On 28 June 2006 the Gdańsk Court of Appeal extended the applicant's detention until 30 September 2006. The court again relied on a strong suspicion that the applicant had committed the offences in question. It additionally considered that the need to carry out further evidence justified the extension of the applicant's detention.
14.  The applicant's lawyer appealed against this decision.
15.  On 12 July 2006 the Gdańsk Court of Appeal upheld the challenged decision, basically repeating the reasons given previously.
16.  On 26 September 2006 the Gdańsk Court of Appeal again extended the applicant's detention, until 15 November 2006. The Court relied on the same grounds as in its decision of 28 June 2006.
17.  The applicant appealed.
18.  On 11 October 2006 the Gdańsk Court of Appeal upheld the challenged decision. The Court did not rely on any new arguments; it admitted that the applicant's detention had been very lengthy, because it had been imposed on him on 4 June 2004. However, it found that, taking into consideration the likelihood of a severe sentence of imprisonment, the length of detention “remained in proportional relation” to the possible penalty.
19.  On 8 November 2006 the Gdańsk Court of Appeal extended the applicant's detention until 20 December 2006. No new grounds justifying the detention were invoked.
20.  On 14 December 2006 the Gdańsk Court of Appeal extended the applicant's detention until 31 January 2007. The Court of Appeal granted the Regional Court's request, which stated that the detention should be extended because the trial could not be terminated due to the illness of one of the judges. The Court of Appeal considered that the trial was “in its final phase”. It did not, however, rely on any new grounds justifying the extended detention. It only repeated the argument which had been used before, namely that the severity of the sentence faced by the applicant created in itself a risk that he might tamper with evidence or otherwise obstruct the proceedings.
21.  On 30 January 2007 the Gdańsk Regional Court sentenced the applicant to six years' imprisonment. He was found guilty of false imprisonment, ill-treatment and unintentionally causing the death of a human being.
22.  The applicant, the other co-accused and the prosecutor lodged appeals against the first‑instance judgment.
23.  On 18 September 2007 the Gdańsk Court of Appeal extended the applicant's detention until 31 December 2007 “taking into account that the appellate proceedings were still pending”.
24.  On 4 October 2007 the Gdańsk Court of Appeal quashed the first‑instance judgment and remitted the case to the Gdańsk Regional Court.
25.  On 8 October 2008 the Gdańsk Court of Appeal, having examined the applicant's appeal against further extension of his detention ordered by the Gdańsk Regional Court's decision of 26 September 2008, released the applicant from detention. The Court of Appeal considered that after such a long period of detention the Regional Court should have demonstrated the existence of grounds of detention other than those on which the courts had relied previously, supported by particular circumstances justifying their existence. In the Court of Appeal's view, the Regional Court had failed to do so.
26.  The criminal proceedings against the applicant are still pending.
27.  The applicant submitted that during the whole period of his detention the cells allocated to him were designed for four but were shared by six prisoners. The applicant was detained in at least four detention centres, in Ustka, Słupsk, Gdańsk and Stargard Szczeciński.
28.  The Government submitted information only as regards the applicant's detention in the Gdańsk Detention Centre. The applicant was detained there from 3 March 2005 to 16 February 2007, from 7 to 13 September 2007, and from 19 October 2007 to 8 October 2008, when he was released. As regards these periods it was confirmed by the Government that the area of the cells in which the applicant was detained remained consistently below three square metres.
29.  On 27 July 2005 and 19 September 2006 the Gdańsk Regional Court refused to allow the applicant's family to visit him in person (widzenie przy stoliku).
30.  By a letter from the court of 7 June 2006 the applicant was informed that personal contact with his family would be allowed “on the same basis as before”, that is, “on the phone”.
31.  At the initial stage of detention, on 7 March, 11 April and 5 May 2005, the applicant was allowed to talk to his wife on the phone. Subsequently, on 6 June and 5 July 2005 he was allowed visits from his wife. On 22 August 2005 his brother and mother visited him. Later, the applicant's wife visited him on numerous occasions: in 2005 on 3 October, 9 November and 19 December, and in 2006 on 14 March, 11 April, 3 May, 8 June, 10 July, 8 August, 5 September, 5 October and 6 November. On several occasions the applicant's wife visited him with his mother. His mother visited him on at least six other occasions. In October and December 2007 and in February 2008 the applicant was also visited by his brother and cousins.