6.  The applicant was born in 1972 and lives in Ulyanovsk. 7.  On 16 September 2004 he was arrested on suspicion of drug trafficking. 8.  On 18 September 2004 the applicant was charged with the attempted sale of a particularly large quantity of drugs. On the same date the Dmitrovgrad Town Court of the Ulyanovsk Region (“the Town Court”) authorised his pre-trial detention. The court did not set any time-limit. However, it referred to Article 108 of the Criminal Code of the Russian Federation (“the CCrP”, see paragraph 19 below). 9.  On 16 December 2004 the investigation was completed and the prosecution submitted the case to the Town Court for trial. 10.  On 22 December 2004 the Town Court scheduled a preliminary hearing for 30 December 2004 and held, without further details, that the applicant should stay in detention. The time-limit for the extension was not specified. 11.  On 30 December 2004 the Town Court carried out a preliminary examination of the case and noticed various shortcomings and defects in the investigation. With reference to Article 237 § 1 of the CCrP (see paragraph 24 below) the court decided to return the file to the prosecutor to remedy the violations within five days. The court further ruled that the measure of restraint applied to the applicant “should remain unchanged”, without setting any time-limit or providing any reasons for that decision. 12.  On an unspecified date the prosecutor of the Town Court received the case file. On 11 January 2005 the prosecutor forwarded the file to the investigator. 13.  By a decision of 12 January 2005 the investigator observed that the five-day time-limit set out to remedy the violations had expired on 4 January 2005. However, the decision stated that the time-limit was not respected for a valid reason, namely because 1-10 January 2005 were public holidays in Russia and it was therefore impracticable to complete the actions required by the Town Court's decision of 30 December 2004. The investigator accordingly decided to “reinstate the missed five-day time-limit for remedying the violations” and “to consider 14 January 2005 as the expiry date of the five-day time-limit”. 14.  On the same date the investigator applied to the Town Court for an extension of the investigation period until 25 January 2005 on account of the impossibility of remedying the violations by 14 January 2005. By a separate motion the investigator applied for an extension of the applicant's pre-trial detention until 25 January 2005 because the time-limit for the investigation had been extended for a valid reason and the corrections to the investigation file could not have been made by 14 January 2005. The investigator, in particular, reasoned as follows:
“On 12 January 2005 the period of the investigation of the present criminal case was extended until 25 January 2005, and therefore it has become necessary to extend the period of [the applicant's] detention, which is due to expire on 14 January 2005, for a further eleven days, that is until 25 January 2005” 15.  On 13 January 2005 the Town Court allowed the application, having found, in particular, as follows:
“The investigator applied for an extension of [the applicant's] detention ... until 25 January 2005... in order to complete the investigation ... on the ground that the period of the investigation had been extended...while the period of the applicant's detention was due to expire.
[...] The court considers the request well-founded and upholds it because the investigation cannot be completed within the established time-limit. ”
The court further held that the applicant did not have a permanent place of residence, was charged with a serious criminal offence and was liable to abscond and reoffend, as well as threaten witnesses and obstruct the course of justice if at liberty. With reference to Article 109 of the CCrP the court extended the applicant's detention for an additional eleven days, until 25 January 2005. Therefore, the period of detention would amount to four months and nine days in total. 16.  On 17 January the applicant appealed against the decision. He argued that after 4 January 2005 he had been held in custody unlawfully and that the domestic law of criminal procedure did not allow for the reinstatement of time-limits for pre-trial detention. The period of public holidays could not be excluded from the overall duration of the pre-trial detention and did not constitute a valid reason for any extension. Moreover, the first-instance court had remitted the case unlawfully on account of the necessity to complete the investigation because, in accordance with CCrP, if the case file was sent back to the prosecutor to remedy the violations, no further investigative activities could be carried out. 17.  On 4 February 2005 the Ulyanovsk Regional Court upheld the extension order. The court established that the applicant had been placed in custody on 18 November 2004 and thereafter the detention was extended until 25 January 2005, in accordance with Article 108 § 1 and  109 § 2. When authorising the extension, the lower court had correctly taken into account the applicant's character, his family status, the gravity of the charges against him and other relevant circumstances. The appeal court rejected the applicant's arguments as having no basis in domestic law. 18.  On 22 March 2005 the Dmitrovgrad Town Court convicted the applicant as charged and sentenced him to eleven years' imprisonment. His detention from 16 September 2004 counted toward the applicant's prison term.