5.  The applicant was born in 1953. When lodging his application, he was detained in Bruchsal Prison. He has been released on 28 August 2009. 6.  Since 1972 the applicant has been convicted of five counts of rape and two counts of attempted rape of women aged between sixteen and nineteen and has been sentenced three times to terms of imprisonment. Between May 1976 and his arrest in 1989 he spent only some eight and a half months outside prison. 7.  On 23 May 1990 the Heilbronn Regional Court convicted the applicant of attempted sexual coercion. It sentenced him to three years' imprisonment and ordered his placement in preventive detention pursuant to Article 66 § 1 of the Criminal Code (see paragraphs 22-23 below). The Regional Court found that in October 1989 the applicant, returning to methods similar to those he had used to commit some of his previous offences, had simulated a breakdown of his car and had asked a twenty‑three-year-old woman to help him restart it. He had then attempted to force his victim to submit herself to sexual acts, but she had managed to escape. The preventive detention of the applicant, who had acted with full criminal responsibility, was necessary as he had a tendency to commit serious sexual offences in order to humiliate and abuse women and was thus likely to reoffend. 8.  The applicant served his full prison sentence. He was then placed in preventive detention, for the first time, on 24 October 1992; he had thus served ten years in preventive detention by 23 October 2002. 9.  The continuation of the applicant's preventive detention was ordered by the Karlsruhe Regional Court at regular intervals. 10.  On 15 October 2002 the Karlsruhe Regional Court, sitting as a chamber responsible for the execution of sentences, having heard the applicant, his counsel and a psychiatric expert, W., in person, ordered the applicant's preventive detention to continue pursuant to Article 67d § 3 of the Criminal Code (see paragraph 25 below). It found that there was still a risk that the applicant, owing to his criminal tendencies, might commit serious sexual offences if released resulting in considerable psychological or physical harm to the victims. 11.  The Regional Court subscribed to the opinion given by expert W. in his report of 3 October 2002. The expert, who had to give his view on the basis of the case file as the applicant had refused to make any submissions to him, had concluded that there was nothing to indicate that the applicant, who had committed numerous sexual offences and suffered from a personality disorder, had changed. He was therefore likely to reoffend if released. 12.  The Regional Court further found that neither the applicant's personal situation nor his attitude had changed since its last decision. As had also been confirmed by expert W., without submitting himself to a therapeutic treatment, notably to a social therapy, which the applicant kept refusing to do, the conditions for suspending the applicant's preventive detention on probation could not be met. 13.  Contrary to the applicant's view, the Regional Court further considered that Article 67d of the Criminal Code, as amended in 1998 (see paragraph 25 below), was constitutional. 14.  On 21 November 2002 the Karlsruhe Court of Appeal, endorsing the reasons given by the Regional Court, dismissed the applicant's appeal. 15.  On 13 December 2002 the applicant, represented by counsel, lodged a constitutional complaint with the Federal Constitutional Court. He complained about the decision to prolong his preventive detention on completion of ten years of placement on the basis of the amended Article 67d § 3 of the Criminal Code, which had entered into force after he had committed his offence. He argued that the decision violated the prohibition of retrospective punishment under the Basic Law, the prohibition of retrospective legislation enshrined in the rule of law and his right to liberty. That decision further breached the principle of proportionality in that the courts responsible for the execution of sentences had made his release dependent on the completion of a social therapy lasting five to seven years, which would unduly prolong his preventive detention. 16.  On 22 March 2004 the Federal Constitutional Court declined to consider the applicant's constitutional complaint (file no. 2 BvR 2027/02). It found that the applicant's complaint was ill-founded. Referring to its leading judgment of 5 February 2004 in the case of M. (file no. 2 BvR 2029/01; application no. 19359/04 to this Court), it stated that the provisions on which the applicant's continued preventive detention was based, Article 67d § 3 of the Criminal Code, read in conjunction with section 1a § 3 of the Introductory Act to the Criminal Code, as amended in January 1998 (see paragraph 25 below), were constitutional. 17.  Moreover, in the Federal Constitutional Court's view, the criminal courts had not applied these provisions to the applicant in a disproportionate manner. There were notably no objections under constitutional law to considering the total absence of a necessary therapy to be a negative factor in the assessment of whether the applicant was likely to reoffend. 18.  In 2004 the applicant was diagnosed with cancer of the lymph nodes and subsequently with cancer of the eyes. 19.  On 11 July 2005 and on 1 October 2007 the Karlsruhe Regional Court ordered the continuation of the applicant's preventive detention. 20.  On 29 April 2009 the Karlsruhe Regional Court, sitting as a chamber responsible for the execution of sentences, decided to suspend the further execution of the applicant's preventive detention on probation as from 31 August 2009 and ordered the supervision of his conduct. Having consulted a medical expert, it considered that there were justifiable reasons for testing whether the applicant could be released without committing further unlawful acts. It noted that the applicant had persistently refused to make a social (group) therapy, considered most suitable by all medical experts consulted, but had at least made an individual therapy with an external psychotherapist. The applicant was released from preventive detention on 28 August 2009. 21.  A comprehensive summary of the provisions of the Criminal Code and of the Code of Criminal Procedure governing the distinction between penalties and measures of correction and prevention, in particular preventive detention, and the making, review and execution in practice of preventive detention orders, is contained in the Court's judgment in the case of M. v. Germany (no. 19359/04, §§ 45-78, 17 December 2009). The provisions referred to in the present case provide as follows: 22.  The sentencing court may, at the time of the offender's conviction, order his preventive detention, a so-called measure of correction and prevention, under certain circumstances in addition to his prison sentence, a penalty, if the offender has been shown to be dangerous to the public (Article 66 of the Criminal Code). 23.  In particular, the sentencing court orders preventive detention in addition to the penalty if someone is sentenced for an intentional offence to at least two years' imprisonment and if the following further conditions are satisfied. Firstly, the perpetrator must have been sentenced twice already, to at least one year's imprisonment in each case, for intentional offences committed prior to the new offence. Secondly, the perpetrator must previously have served a prison sentence or must have been detained pursuant to a measure of correction and prevention for at least two years. Thirdly, a comprehensive assessment of the perpetrator and his acts must reveal that, owing to his propensity to commit serious offences, notably those which seriously harm their victims physically or mentally or which cause serious economic damage, the perpetrator presents a danger to the general public (see Article 66 § 1 of the Criminal Code, in its version in force at the relevant time). 24.  Under Article 67d § 1 of the Criminal Code, in its version in force prior to 31 January 1998, the first period of preventive detention may not exceed ten years. If the maximum duration has expired, the detainee shall be released (Article 67d § 3). 25.  Article 67d of the Criminal Code was amended by the Combating of Sexual Offences and Other Dangerous Offences Act of 26 January 1998, which entered into force on 31 January 1998. Article 67d § 3, in its amended version, provided that if a person has spent ten years in preventive detention, the court shall declare the measure terminated (only) if there is no danger that the detainee will, owing to his criminal tendencies, commit serious offences resulting in considerable psychological or physical harm to the victims. Termination shall automatically entail supervision of the conduct of the offender. The former maximum duration of a first period of preventive detention was abolished. Pursuant to section 1a § 3 of the Introductory Act to the Criminal Code, the amended version of Article 67d § 3 of the Criminal Code was to be applied without any restriction ratione temporis.