Legal detention refers to the period of detention during the period of investigation of a crime, and while awaiting trial, prior to sentencing. It differs to the concept of administrative detention which is the arrest and detention of individuals by the state without trial, usually for security reasons.

The period of legal detention, particularly of young offenders with mental health problems, can be a high risk time with the likelihood of suicide and self harm increased.