Detain
late Middle English (in the sense ‘be afflicted with sickness or infirmity’): from Old French detenir, from a variant of Latin detinere, from de- ‘away, aside’ + tenere ‘to hold’.
wiktionary
From Old French detenir. Cognate with Italian detenere, Portuguese deter, Romanian deține, and Spanish detener.
etymonline
detain (v.)
early 15c. (implied in deteined), "keep back or away, withhold," from Old French detenir "to hold off, keep back" (12c.), from Latin detinere "hold off, keep back," from de "from, away" (see de-) + tenere "to hold," from PIE root *ten- "to stretch."
Legal sense of "to hold in custody" is from late 15c. (late 13c. in Anglo-French). Meaning "keep or restrain from proceeding" is from 1590s. Modern spelling is 17c., from influence of contain, retain, etc. Related: Detained; detaining.