What law governs detention?
In Germany, detention is regulated in the respective school laws of the different federal states. In Baden-Württemberg, for example, the school law states that a teacher may order detention for a maximum of two hours, while detention of up to four hours must be granted by the principal (§90 Abs. 3 SchulG BW).
In Schleswig-Holstein, North Rhine-Westphalia and Hamburg, detention is allowed provided that the parents have been notified in advance (§25 SchulG Schleswig-Holstein, §53 Abs. 2 SchulG NRW, §49 Abs. 1 Hamburgisches SchulG).
In Bavaria, detention is allowed, but only with supervision by a teacher and a prior written appointment. In Rhineland-Palatinate, mere detention, i.e. staying longer without reworking, is not permitted (§83 Paragraph 1 ÜSchO Rh-Pfalz). This means that detention there is only permitted for the purpose of reworking missed lessons. In Saxony, on the other hand, there are no concrete regulations on detention in the school law.