5.  The applicant was born in 1952 and lives in Lubin. 6.  In February 2003 the police instituted an investigation against the applicant. He was suspected of poisoning several pheasants which belonged to his wife’s alleged lover. Subsequently, the applicant was also suspected of uttering threats towards his wife and the person with whom she was allegedly in a relationship. 7.  On 4 March 2003 the applicant was arrested on suspicion of uttering threats. On 6 March 2003 the Nowa Sól District Court (Sąd Rejonowy) heard the applicant and remanded him in custody until 4 June 2003. The court noted that there was a reasonable suspicion that the applicant had committed the offence in question. In addition, the court relied on the risk that he would induce witnesses to give false testimony. 8.  On 26 March 2003 the Nowa Sól District Prosecutor obtained information from the psychiatric hospital in Wschowa that the applicant had undergone treatment there. 9.  On 25 April 2003 two psychiatrists gave an opinion on the applicant’s mental health. They concluded that the applicant had previously been successfully treated in the Cibórz psychiatric hospital and that he was suffering from acute psychotic disorders. He should be placed in a psychiatric hospital for further observation. 10.  On 9 May 2003 the prosecutor asked the director of the detention centre where the applicant was detained whether the applicant’s stay in custody might endanger his health. The director replied that the applicant was under constant medical care. 11.  On 2 June 2003 the District Court ordered the applicant to undergo a six‑week psychiatric examination in order to determine whether he could be held criminally responsible in respect of the above‑mentioned offence. The court also extended the applicant’s detention for three more months. The court referred to the reasons given previously. In addition, it relied on the risk that the applicant might commit yet another offence. 12.  On 3 September 2003 the court again extended the applicant’s detention until 4 December 2003. The court repeated the grounds given previously. It further stressed that the applicant was undergoing medical observation. 13.  The applicant was admitted to a hospital on 12 August 2003 and released on 26 September 2003. On 11 November 2003 two psychiatrists issued a joint medical opinion. They concluded that the applicant suffered from an organic delusional disorder. In view of the fact that there was a reasonable suspicion that he might commit another crime, they recommended his detention in a psychiatric hospital. 14.  On 27 November 2003 the prosecutor lodged a request for discontinuation of the investigation because of the applicant’s mental condition. He further requested that the applicant be placed in a psychiatric hospital. 15.  On 3 December 2003 the applicant’s detention was again extended. 16.  On 5 January 2004 the Nowa Sól District Court gave a decision and discontinued the proceedings against the applicant. The court found it established that the applicant had committed the offence in question. However, he should not have been held criminally responsible as he was suffering from an organic delusional disorder. It further referred to the expert’s opinion and ordered that the applicant be placed in a psychiatric hospital in Kościan. 17.  On 2 March 2004 the court extended the applicant’s detention until 4 May 2004. It stressed that the psychiatric hospital had not yet finalised a date for the applicant’s admission. In addition, the court considered that this measure was necessary to prevent the applicant from committing another offence. 18.  On 26 March 2004 the court ordered that the applicant be placed in a different hospital – the Cibórz Psychiatric Hospital, since the one originally designated was full. 19.  The applicant was admitted to the hospital on 30 March 2004 and released on 26 September 2004. 20.  On 5 June 2006 the Zielona Góra Regional Court awarded the applicant 17,093 Polish zlotys (PLN) compensation for pecuniary damage and PLN 8,516 as compensation for non-pecuniary damage for unjustified detention. The court relied on the resolution of the Supreme Court of 15 September 1999, according to which the State Treasury was responsible for detention of persons in whose cases proceedings were discontinued due to their mental disorder. However, the sum awarded did not relate to the applicant’s detention after 5 January 2004, that is after discontinuation of the proceedings. 21.  The applicant appealed, objecting to the amount of compensation granted and the fact that it did not cover the whole period of detention. 22.  On 7 September 2006 the Poznań Court of Appeal gave judgment and dismissed the applicant’s appeal. The court noted that the applicant’s detention had been justified throughout the whole period. However, since the prosecutor had failed to appeal against the first-instance judgment, it could not be amended.