Hence, "to overthrow, defeat" (1540s; as a noun in this sense from late 15c.); "frustrate the efforts of" (1560s). Related: Foiled; foiling. Foiled again! as a cry of defeat and dismay is from at least 1847.
"very thin sheet of metal," early 14c., foile, from Old French foil, fueill, fueille "leaf; foliage; sheet of paper; sheet of metal" (12c., Modern French feuille), from Latin folia, plural (mistaken for fem. singular) of folium "leaf" (from PIE root *bhel- (3) "to thrive, bloom").
The sense of "one who enhances another by contrast" (1580s) is from the practice of backing a gem with metal foil to make it shine more brilliantly. The meaning "light sword used in fencing" (1590s) could be from this sense, or from foil (v.). The sense of "metallic food wrap" is from 1897.
c. 1400, "to desecrate, profane;" mid-15c., "to make foul or dirty," also "to rape, deflower," alteration of earlier defoulen, from Old French defouler "trample down, violate," also "ill-treat, dishonor," from de- "down" (see de-) + foler "to tread," from Latin fullo "person who cleans and thickens cloth by stamping on it" (see foil (v.1)).
The alteration (or re-formation) in English is from influence of Middle English filen (v.) "to render foul; make unclean or impure," literal and figurative, from Old English fylen (trans.), related to Old English fulian (intrans.) "to become foul, rot," from the source of foul (adj.). Compare befoul, which also had a parallel form befilen. Related: Defiled; defiling.
It forms all or part of: blade; bleed; bless; blood; blow (v.2) "to bloom, blossom;" bloom (n.1) "blossom of a plant;" bloom (n.2) "rough mass of wrought iron;" blossom; cauliflower; chervil; cinquefoil; deflower; defoliation; effloresce; exfoliate; feuilleton; flora; floral; floret; florid; florin; florist; flour; flourish; flower; foil (n.) "very thin sheet of metal;" foliage; folio; folium; gillyflower; Phyllis; phyllo-; portfolio; trefoil.
It is the hypothetical source of/evidence for its existence is provided by: Greek phyllon "leaf;" Latin flos "flower," folio, folium "leaf;" Middle Irish blath, Welsh blawd "blossom, flower;" Gaelic bile "leaflet, blossom;" Old English blowan "to flower, bloom."