fer back to national law and state the obligation to conform to the substantive and procedural rules thereof. However, the "lawfulness" of detention under domestic law is not always the decisive element. The Court must in addition be satisfied that detention during the period under consideration was compatible with the purpose of Article 5 § 1 of the Convention, which is to prevent persons from being deprived of their liberty in an arbitrary fashion (see Khudoyorov, cited above, § 124, and Fedotov v. Russia, No. 5140/02, § 74, 25 October 2005).
54. The Court must moreover ascertain whether domestic law itself is in conformity with the Convention, including the general principles expressed or implied therein. On this last point, the Court stresses that, where deprivation of liberty is concerned, it is particularly important that the general principle of legal certainty be satisfied. It is therefore essential that the conditions for deprivation of liberty under domestic law be clearly defined and that the law itself be foreseeable in its application, so that it meets the standard of "lawfulness" set by the Convention, a standard which requires that all law be sufficiently precise to allow the person - if need be, with appropriate advice - to foresee, to a degree that is reasonable in the circumstances, the consequences which a given action may entail (see {Jecius} v. Lithuania, No. 34578/97, § 56, ECHR 2000-IX, and Baranowski v. Poland, No. 28358/95, §§ 50 - 52, ECHR 2000-III).
(b) Application to the present case
(i) Applicant's detention from 1 July to 2 December 2002
55. The Court observes that on 1 July 2002 St Petersburg City Court extended the applicant's detention until 1 October 2002. On 11 November 2002 the Supreme Court quashed the above decision, because neither the applicant nor his representative had been given proper notice of the hearing and had been absent as a result, and ordered a re-examination of his detention in respect of the above period.
56. The Court further observes that on 24 September 2002 St Petersburg City Court extended the applicant's detention from 30 September to 30 December 2002. On 2 December 2002, however, the Supreme Court quashed the above decision because the applicant's representative was absent from the hearing and ordered a re-examination of his detention in respect of the above period.
57. The issue to be determined is whether the applicant's detention in the above periods was "lawful", including whether it complied with "a procedure prescribed by law". The Court reiterates that a period of detention will in principle be lawful if served pursuant to a court order. A subsequent finding that the court erred under domestic law in making the order will not necessarily affect retrospectively the validity of the intervening period of detention.
58. In the present case the Court will consider whether the detention order of 1 July 2002 constituted a lawful basis for the applicant's detention until 1 October 2002, and whether the detention order of 24 September 2002 constituted a lawful basis for the applicant's detention until its quashing on 2 December 2002. The mere fact that the orders were set aside on appeal did not in itself affect the lawfulness of the detention in the preceding periods (see Benham v. the United Kingdom, 10 June 1996, §§ 43 and 46, Reports 1996-III).
59. It has not been alleged that on 1 July and 24 September 2002 the City Court acted in excess of its jurisdiction. Indeed, as a matter of domestic law, it had the authority to examine the issue of extension of the applicant's detention and to grant further extensions, not exceeding three months. Furthermore, the Court finds that the applicant's detention on the basis of the orders of 1 July and 24 September 2002 cannot be said to have been arbitrary as the court gave certain grounds justifying the co
> 1 2 3 ... 6 7 8 ... 17 18 19