Prisons are establishments set up to punish and rehabilitate offenders, and to act as a deterrent to criminal behavior. The British prison population has been increasing steadily over the last 20 years, mostly because offenders are in prison for longer periods of time. The majority of prisoners have complex mental health problems, learning disability, addiction to illicit substances, and usually a combination of these three. Arguably many prisoners should be detained and treated in healthcare establishments, so that prison staff can have the time to rehabilitate those prisoners who do not have such problems.