detention

nouns

a state of being confined (usually for a short time)
"his detention was politically motivated"; "the prisoner is on hold"; "he is in the custody of police"
is derived from
a punishment in which a student must stay at school after others have gone home
"the detention of tardy pupils"
is derived from
is a type of (narrower)
the act of punishing