e 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.
II. Relevant domestic law
19. Article 108 §§ 1, 3 - 6 of the CCrP requires a judicial decision by a district or town court on a reasoned request by a prosecutor, supported by appropriate evidence, before a defendant can be detained or his or her detention extended.
20. The CCrP makes a distinction between two types of remand in custody: the first being "during investigation", that is, while a competent agency - the police or a prosecutor's office - is investigating the case, and the second being "before the court" (or "during trial proceedings"), at the judicial stage. Although there is no difference in practice between them (the detainee is held in the same detention facility), the calculation of the time-limits is different.
21. After arrest, the suspect is placed in custody "during the investigation". A period of detention during the investigation of criminal offence shall not last longer than two months. If it is impossible to complete the preliminary investigation within two months and there are no grounds for modifying or lifting the preventive measure, this time-limit may be extended by up to six months by a judge of a district or military garrison court of the relevant level. No extension beyond eighteen months is possible (Article 109 §§ 1 - 3). The period of detention "during the investigation" is calculated up to the day when the prosecutor sends the case to the trial court (Article 109 § 9)
22. From the date the prosecutor forwards the case to the trial court, the defendant's detention is "before the court" (or "during the trial"). The CCrP establishes that the term of detention "during the trial" is calculated from the date the court receives the file to the date the judgment is given. The period of detention during "the trial" may not normally exceed six months, but if the case concerns serious or particularly serious criminal offences, the trial court may approve one or more extensions (Article 255 §§ 2 and 3).
23. Upon receipt of the case file the judge must determine, in particular, whether the defendant should remain in custody or be released pending trial (Articles 228 § 3 and 231 § 2 (6) of the CCrP).
24. The trial judge can return the case to the prosecutor to remedy the defects impeding the trial, for instance if the judge has identified serious deficiencies in the bill of indictment or a copy of it was not served on the accused (Articles 236 § 1 (2), 237 § 1 of the CCrP). The judge must require that the prosecutor comply within five days and must also decide on a preventive measure in respect of the accused (Article 237 § 2).
25. At any time during the trial the court may order, vary or revoke any preventive measure, including detention (Article 255 § 1). When returning the case to the prosecutor, the judge has to decide upon the measure of restraint to be applied to the accused (Article 237 § 3).
26. An appeal against such a decision lies to the higher court. It must be lodged within ten days and examined within the same time-limit as an appeal against the judgment on the merits (Article 255 § 4 of the CCrP).
THE LAW
I. Alleged violation of Article 5 § 1 of the Convention
27. The applicant complained invoking Article 5 § 1 of the Convention that his detention from 4 to 13 January 2005 had been unlawful. The relevant parts of Article 5 read as follows:
"1. Everyone has the right to liberty and security of person. No one shall be deprived of his liberty save in the following cases and in accordance with a procedure prescr
> 1 2 3 4 5 ... 6 7