5.  The applicant was born in 1955. At the time of lodging his application, he was detained in Kaisheim Prison. He was released subsequently. 6.  The applicant has been continuously addicted to heroin since 1973, when he was aged 17. He has also been suffering from hepatitis C since 1975 and has been HIV-positive since 1988. He has been considered 100% disabled and has been receiving an employment disability pension since 2001. He has tried to overcome his addiction to heroin with various types of treatment (including five courses of in-house drug rehabilitation therapy), all of which failed. From 1991 to 2008 the applicant’s heroin addiction was treated with medically prescribed and supervised drug substitution therapy. Since 2005, the applicant had reduced the dosage of his drug substitution medication (Polamidon) and consumed heroin in addition to that medication. 7.  In 2008 the applicant was arrested on suspicion of drug trafficking and taken in detention on remand in Kaisheim Prison, where his drug substitution treatment was interrupted against his will. On 3 June 2009 the Augsburg Regional Court convicted the applicant of drug trafficking, sentenced him to three years and six months’ imprisonment and, having regard to a previous conviction, to another two years and six months’ imprisonment. It further ordered the applicant’s placement in a drug detoxification facility, to be executed after a period of six months’ detention in prison. The applicant was still not provided with substitution treatment for his heroin addiction. On 10 December 2009 he was transferred to a drug rehabilitation centre in Günzburg, Bavaria, where he underwent abstinence‑based treatment for his addiction, without additional substitution treatment. 8.  On 19 April 2010 the Memmingen Regional Court declared the applicant’s detention in the detoxification facility terminated and ordered his retransfer to prison. In a decision dated 25 June 2010 the Munich Court of Appeal dismissed the applicant’s appeal. Having regard, in particular, to the views expressed by the applicant’s treating doctors, the court considered that it could no longer be expected with sufficient probability that the applicant could be cured from his drug addiction or could be prevented for a considerable time from relapsing into drug abuse. He had secretly consumed methadone at the clinic and lacked motivation to lead a drug-free life. 9.  The applicant was transferred back to Kaisheim Prison on 30 April 2010. The prison doctors gave him various painkillers for chronic pain resulting from his polyneuropathy, on a daily basis. During his detention, the pain in his feet, neck and spine became such that, at least during certain periods, he spent most of his time in bed. 10.  The applicant was examined by an external doctor for internal medicine, H., on the prison authorities’ request in October 2010. H. did not consider any changes in the treatment of the applicant’s HIV and hepatitis C infections necessary. Having regard to the applicant’s chronic pain linked to his long-term drug consumption and polyneuropathy, he suggested that the prison medical service reconsider the possibility of drug substitution treatment. He subsequently confirmed that the applicant should be examined by a doctor specialised in drug addiction therapy to that end. 11.  The applicant also obtained, on his request, an opinion drawn up by an external doctor specialised in drug addiction treatment (B.) dated 27 July 2011, on the basis of the written findings of doctor H. and the Kaisheim Prison doctor’s and authorities’ findings and statements, but without having been able to examine the applicant in person. B. considered that from a medical point of view, drug substitution treatment had to be provided to the applicant. He explained that in accordance with the Federal Medical Association’s Guidelines for the Substitution Treatment of Opiate Addicts (Richtlinien der Bundesärztekammer zur Durchführung der substitutionsgestützten Behandlung Opiatabhängiger) of 19 February 2010 (see paragraph 30 below), drug substitution therapy was internationally recognised as being the best possible therapy for long-standing opioid addicts. Detoxification caused the person concerned serious physical strain and extreme mental stress and should only be attempted in cases of a very short opioid dependence. Drug substitution therapy prevented a deterioration of the patient’s state of health and a high risk to life, which arose particularly after forced abstinence in detention. It further prevented the spreading of infectious diseases such as HIV and hepatitis C. It had to be clarified whether, in the applicant’s case, further treatment for the hepatitis C from which he suffered was necessary. 12.  By submissions dated 6 June 2011, which he supplemented subsequently, the applicant made a request to the Kaisheim prison authorities for treatment with Diamorphin, Polamidon or another heroin substitute for his heroin addiction. Alternatively, he requested that the question of whether such substitution treatment was necessary be examined by a drug addiction specialist. 13.  The applicant claimed that drug substitution treatment was the only adequate treatment for his medical condition. Under the relevant Guidelines of the Federal Medical Association for the Substitution Treatment of Opiate Addicts, drug substitution treatment, which he had received prior to his detention, was the required standard treatment for his condition and had to be continued during his detention. 14.  The applicant claimed that, as confirmed by doctor H., the serious chronic neurological pain from which he was suffering could be considerably alleviated by drug substitution treatment, as had been the case during his previous substitution treatment. Having been addicted to heroin for almost forty years, he stood hardly any chance of leading a totally drug‑free life on release from prison. His rehabilitation could therefore better be furthered by providing him drug substitution treatment. While undergoing such treatment previously, he had been able to lead a relatively normal life and to complete training as a software engineer. 15.  Furthermore, referring to doctor B.’s opinion, the applicant claimed that he was in need of Interferon therapy in order to treat his hepatitis C infection. In view of his poor physical and mental health, it was impossible to carry out such treatment without simultaneous drug substitution therapy. Substitution also helped to protect other prisoners from infection when using the same needles as he did for the consumption of drugs and diminished the trafficking and uncontrolled consumption of illegal drugs in prison. He also considered that the prison doctors did not have specialist knowledge in drug addiction treatment and asked to be examined by an external specialist. 16.  After the prison authorities’ first decision dismissing the applicant’s application was quashed by the Augsburg Regional Court on 4 October 2011 for lack of sufficient reasoning, the prison authorities, on 16 January 2012, again dismissed the applicant’s request. 17.  The prison authorities argued that substitution treatment was neither necessary from a medical point of view nor a suitable measure for the applicant’s rehabilitation. With regard to the medical necessity of drug substitution therapy, the prison authorities, relying on prison doctor S.’s statement, considered that drug substitution therapy was not a necessary treatment for the purposes of section 60 of the Bavarian Execution of Sentences Act (see paragraph 27 below). They found that the applicant, who was severely addicted to drugs, had not received drug substitution treatment prior to his current detention in Kaisheim Prison. He had been placed in a drug rehabilitation centre for five months before his transfer to Kaisheim Prison, where he had been treated by medical experts with considerable knowledge of drug addiction treatment. The applicant had neither been given substitution treatment in the clinic, nor had the doctors recommended substitution treatment in prison. After three years in detention, he no longer suffered from physical withdrawal symptoms. Moreover, his condition with regard to his HIV and hepatitis C infections was stable and did not require any therapy for which substitution treatment was a necessary precondition. As suggested by the prison doctor, the applicant should use the opportunity to wean himself off opioids, such as heroin and its substitutes, while in prison, as it was very difficult to obtain drugs there. 18.  With regard to the applicant’s social rehabilitation and treatment (sections 2 and 3 of the Bavarian Execution of Sentences Act, see paragraph 27 below), the prison authorities added that the main reason for which addicts underwent drug substitution therapy was to prevent them from becoming impoverished and from becoming involved in drug-related criminality. In prison, these risks were not present. Furthermore, the applicant had already shown that substitution therapy while he was at liberty had not prevented him from consuming other drugs or committing crimes, which had been caused by his antisocial nature. Moreover, the applicant had also consumed drugs while in detention. Therefore, providing him substitution treatment could lead to a risk to life and limb. 19.  On 26 January 2012 the applicant, relying on the reasons he had submitted to the prison authorities, appealed against the decision of the prison authorities to the Augsburg Regional Court. He further submitted that the authorities of Kaisheim Prison, where no substitution treatment had ever been provided, had omitted to examine the medical necessity of drug substitution therapy under the relevant criteria laid down, in particular, in the Federal Medical Association’s Guidelines for the Substitution Treatment of Opiate Addicts, which were clearly met in his case. He further argued that under the applicable administrative rules for substitution treatment in prison in the Land of Baden-Württemberg, he would be provided with drug substitution therapy, which is carried out in the prisons of the majority of the German Länder. 20.  On 28 March 2012 the Augsburg Regional Court, endorsing the reasons given by the prison authorities, dismissed the applicant’s appeal. It added that it was not necessary to obtain the opinion of a drug addiction expert. The prison doctors of Kaisheim Prison had sufficient training to decide on the medical necessity of drug substitution therapy, irrespective of the fact that drug substitution therapies might never have been used in that prison. The administrative rules for substitution treatment in prison applicable in the Land of Baden-Württemberg were irrelevant, given that Kaisheim Prison was situated in the Land of Bavaria. 21.  On 4 May 2012 the applicant lodged an appeal on points of law with the Munich Court of Appeal. He submitted that the Regional Court’s failure to investigate sufficiently whether drug substitution treatment was necessary, under the applicable Federal Medical Association’s Guidelines and with the help of an independent doctor specialised in drug addiction treatment, had breached section 60 of the Bavarian Execution of Sentences Act and Article 3 of the Convention. Refusing him the alleviation of his intense neurological pain with an existing and medically necessary treatment constituted inhuman treatment. 22.  On 9 August 2012 the Court of Appeal dismissed the appeal as ill‑founded. In the court’s view, the applicant had failed to show why drug substitution therapy was the one specific medical treatment he needed. He had further failed to prove that the prison doctors of Kaisheim Prison were not qualified to decide about the medical necessity of heroin substitution. The applicant’s objection against the Court of Appeal’s decision was rejected. 23.  On 10 September 2012 the applicant lodged a constitutional complaint with the Federal Constitutional Court. He complained that his right to respect for his physical integrity under the Basic Law had been breached because he was denied drug substitution therapy, the only suitable therapy to treat his chronic pain, which would make Interferon therapy possible and allow him to reduce his craving for heroin and lead a “normal” everyday prison life without isolation. He further complained that his right to be heard under the Basic Law had been violated as the domestic courts had not taken into consideration the medical opinions he had submitted to show that a substitution treatment was necessary and had failed to consult an independent specialised expert. 24.  On 10 April 2013 the Federal Constitutional Court declined to consider the applicant’s constitutional complaint without giving reasons (file no. 2 BvR 2263/12). 25.  On 17 November 2014 the Kaisheim prison authorities rejected the applicant’s fresh request to be provided with substitution treatment in preparation for his release. The applicant’s counsel was advised to ensure that the applicant was taken to a drug rehabilitation clinic immediately on his release in order to prevent him from taking an overdose of heroine as soon as he was at liberty. 26.  On 3 December 2014 the applicant was released. When examined by a doctor on 5 December 2014 he tested positive for methadone and cocaine. The doctor confirmed that the applicant would receive drug substitution treatment from 8 December 2014 onwards.