prefix of reversal, deprivation, or removal (as in unhand, undo, unbutton), Old English on-, un-, from Proto-Germanic *andi- (source also of Old Saxon ant-, Old Norse and-, Dutch ont-, Old High German ant-, German ent-, Gothic and- "against"), from PIE *anti "facing opposite, near, in front of, before, against" (from PIE root *ant- "front, forehead," with derivatives meaning "in front of, before").
More or less confused with un- (1) through similarity in the notions of "negation" and "reversal;" an adjective such as unlocked might represent "not locked" (un- (1)) or the past tense of unlock (un- (2)).
twist v.
c. 1200 (implied in past tense form twaste), "to wring," from twist (n.). Sense of "to spin two or more strands of yarn into thread" is attested from late 15c. Meaning "to move in a winding fashion" is recorded from 1630s. To twist the lion's tail was U.S. slang (1895) for "to provoke British feeling" (the lion being the symbol of Britain). To twist (someone's) arm in the figurative sense of "pressure (to do something)" is from 1945. Related: Twisted; twisting.