The health care of prisoners represents a public health priority. However, in many countries, the pursuit of public health goals in prison is not granted. Introducing condom distribution and syringe exchange in prisons remains the exception. This article describes the example of a Swiss canton in which the legal framework enables health-care personnel to put into practice health care that is equivalent to the care available to non imprisoned persons including harm reduction measures for prisoners. The article describes the medical institutions in charge of health care for prisoners and the legal and ethical framework, its repercussions on the clinical and public health context, as well as persisting difficulties. The Geneva experience shows that in spite of the legal context, preventive measures, free informed consent and confidentiality have to be constantly defended by physicians and public health authorities. Both need to be regularly educated on their obligations towards prisoner patients. A complaint mechanism granted to detainees as part of the legal framework is important to adapt existing practice to new challenges.