The Strasbourg judges ruled in favor of the 61-year-old former inmate on Thursday, three years after the German constitutional court threw out his complaint.

The man was arrested for drug trafficking in 2008 and taken to a prison in the Bavarian town of Kaisheim. For years before his arrest, the man had been taking methadone to curb his own addiction to heroin.

However, the state officials had refused to provide him with the substitute drug during his six-year sentence. After complaining of chronic pain, the prison managers had consulted a doctor who recommended that methadone might help the inmate, advice which was ultimately disregarded, according to the Strasbourg court. The inmate received painkillers instead.

After his release in 2014, the man continued his drug substitute therapy.

Hunger strike for methadone

The Human Rights Court claims that inmates need to have the same access to medicine like the general population.

According to German law, however, states and individual prisons have a right to decide whether to administer methadone treatment to prisoners. Around 4 percent of inmates received such treatment in Berlin last year, compared to only 0.4 percent in more conservative Bavaria.

The Bavarian Justice Ministry said the number was further reduced in early 2016.

"The primary goal is and remains to be abstinent from drugs," they said in a statement.

In July, some 50 inmates started a hunger strike demanding methadone treatment in a prison in the northern Bavarian city of Würzburg.

German government has three months to appeal the Thursday verdict. If the decision is confirmed, it might signal a nationwide shift on drug treatment in German jails.

dj/kms (dpa, AFP)