(Section 66 of German Criminal Code (StGB))
Preventive incarceration is a disciplinary measure for the prevention of future crimes and is enforced after the regular prison sentence.
It may be ordered under specific conditions. The person must have already been sentenced to a prison term of at least two years for the commission of an intentional crime, and the overall assessment of the perpetrator and his/her crime must show that he respectively she is a danger to the general public. Therefore preventive incarceration, as opposed to regular imprisonment, is based solely on how dangerous the criminal is for the general public.