late 14c., "a call to arms in the face of danger or an enemy," from Old French alarme (14c.), from Italian all'arme "to arms!" (literally "to the arms"); a contraction of phrase alle arme. Alle is itself a contraction of a "to" (from Latin ad; see ad-) + le, from Latin illas, fem. accusative plural of ille "the" (see le); with arme, from Latin arma "weapons" (including armor), literally "tools, implements (of war)," from PIE root *ar- "to fit together."
The interjection came to be used as the word for the call or warning (compare alert). Extended 16c. to "any sound to warn of danger or to arouse," and to the device that gives it. From mid-15c. as "a state of fearful surprise;" weakened sense of "apprehension, unease" is from 1833. Variant alarum (mid-15c.) is due to the rolling -r- in the vocalized form. Sometimes in early years Englished as all-arm. Alarm clock is attested from 1690s (as A Larum clock).