early 15c., deteynen, 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" (see tenet). Modern spelling is 17c., from influence of contain, retain, etc. Related: Detained; detaining.