5.  The applicant was born in 1974 and is serving a prison sentence in the town of Rubtsovsk (Altay Region). 6.  On 10 February 2003 the applicant was detained on suspicion of theft. 7.  On 12 February 2003 the Altayskiy District Court of the Khakasiya Republic (“the District Court”) remanded the applicant in custody pending investigation. The applicant remained in custody after the start of the trial. The applicant’s detention pending trial was due to expire on 17 December 2003. 8.  On 10 December 2003 the District Court extended the applicant’s detention “for three months, until 17 March 2004”. 9.  On 28 January 2004 the District Court convicted the applicant of theft, and sentenced him to five years’ imprisonment. The District Court stated in the operative part of its judgment that the applicant should remain in custody until the judgment became final. The applicant appealed against the judgment. 10.  On 30 June 2004 the Khakasiya Supreme Court quashed the judgment of 28 January 2004 and remitted the case to the first-instance court for a fresh examination. It left the preventive measure unchanged, stating that there were “no reasons to release [the applicant]”. The Supreme Court did not specify the time-limit for the applicant’s detention. The detention order was based on Article 388 § 1 (8) of the Code of Criminal Procedure. 11.  On 13 July 2004 the District Court received the applicant’s case for re-examination. 12.  On 3 August 2004 the District Court set a date for a hearing and ordered that the preventive measure in respect of the applicant should remain unchanged. The detention order was based on Article 231 § 2 (6) of the Code of Criminal Procedure The detention order neither specified the period of the applicant’s detention nor gave any reasons therefor. The applicant did not appeal against that detention order. 13.  On 12 August 2004 the applicant lodged an application for release. On the same day the District Court rejected it. The applicant appealed.  By a letter of 19 August 2004 the Khakasiya Supreme Court informed the applicant that his appeal against the decision of 12 August 2004 had been struck off the list, since the above-mentioned decision was not amenable to judicial review. 14.  On 19 August 2004 the District Court extended the applicant’s detention from 19 August to 19 October 2004 and noted as follows:
“On 12 February 2003 [the applicant] was remanded in custody. On 17 March 2003 [his] criminal case was submitted to the court for trial. On 17 September 2003 his detention was extended for three months, until 17 December 2003. On the latter date [sic] his detention was extended until 17 March 2004. On 28 January 2004 [the applicant] was convicted and sentenced to a term of imprisonment. On 30 June 2004 the [conviction] judgment was quashed on appeal and the case was remitted for a new examination to the first-instance court. On 13 July 2004 the case arrived at the court. The authorised period of [the applicant’s] detention expires on 19 August 2004 ...” 15.  The applicant appealed, arguing that the previous term of his detention had expired on 18 August 2004. 16.  On 13 October 2004 the District Court extended the applicant’s detention for one month and seventeen days, until 30 November 2004. 17.  On 23 November 2004 the District Court convicted the applicant of theft and sentenced him to three years and six months’ imprisonment. The applicant appealed. 18.  On 9 February 2005 the Khakasiya Supreme Court, having applied a more lenient criminal law, upheld the judgment of 23 November 2004. 19.  On the same date the Khakasiya Supreme Court also rejected the applicant’s appeal against the detention order of 19 August 2005 (see paragraph 14 above) and held as follows:
“The [the applicant’s] argument that the [District Court] issued the detention order on 19 August 2005, while his term of detention had expired on 18 August 2004, cannot serve as a ground for quashing of that detention order. According to Article 255 § 3 of the Code of Criminal Procedure, a court extends a term of detention upon its expiry (по истечении ранее установленного срока). Thus, the law does not forbid the court to extend a term of detention on the next day after the previous term of detention had expired.”