As spelling suggests, it was originally the opposite of friend, but the word began to be used in Old English for "Satan" (as the "enemy of mankind"), which shifted its sense to "diabolical person" (early 13c.). The old sense of the word devolved to foe, then to the imported word enemy. For spelling with -ie- see field. Meaning "devotee (of whatever is indicated)," e.g. dope fiend, is from 1865.