In Irish mythology, the Fomorians, Fomors, or Fomori (Irish Fomóiri, Fomóraig) were a semi-divine race who inhabited Ireland in ancient times. They may have once been believed to be the beings who preceded the gods, similar to the Greek Titans. It has been suggested that they represent the gods of chaos and wild nature, as opposed to the Tuatha Dé Danann who represent the gods of human civilization. Alternatively, they may represent the gods of a proposed pre-Goidelic population of Ireland.
...
The word fomóire is believed to derive from Old Irish fo muire (Modern Irish faoi muire), "under the sea". This, combined with their association with glass towers in the western ocean, suggests a connection with icebergs. However the mór element may derive from a word meaning "terror", whose Anglo-Saxon cognate "maere" survives in English "nightmare", but not in "morbid" which instead comes from the latin, all from the Proto-IndoEuropean word *mor : "to rub, pound, wear away". However, Mac Bain holds that there are phonetic inconsistencies with both these theories that would prevent derivation of the long ó in the morpheme "-mór" from "muire, mora" ("sea") or from "mor, mar" (terror, death). His educated opinion leaves the conclusions of Zimmer fomóiri > fo-mór "sub-magnus" (giants, small? giants, nearly? giants, huge people?). [1]
Among the Basques,there are legends relating how a seaborne race of giants came to settle the Megaliths.The myth of the Mairuak,states that they were tall,strong wisemen from Africa.
In later times any settled pirates or sea-borne raiders were labeled Fomorians and the original meaning of the word became overlooked.