The short-term confinement of dogs in (transport) boxes, crates or similar types of accommodation (such as pens) is increasingly being recommended for the training and management of dogs. The practice does not comply with the legally defined minimum requirements for the keeping of dogs in confined spaces. Furthermore, aspects of animal welfare science and behaviour therapy are rarely considered when addressing whether and under which conditions the measure is legitimate and conforms to legal requirements. The article explores this issue on the basis of Austrian and German animal welfare legislation, considering scientific data on dogs' ethological and behavioural needs, and clarifies the conditions under which deviations from the minimum requirements may exceptionally be regarded as justified. According to the "principle of the gentlest means", which characterizes animal welfare legislation, it is justified to impose the least restriction on dogs' behavioural needs that is necessary to achieve a stated and justified aim. The article also presents recommendations to implement this principle, which should be followed when a short-term deviation from the minimum requirements is justified.