Gnome

Gnomes, also known as the Kuwalden in their own language, are creatures from European folklore on Earth. They are basically human-like, although they're much smaller; only about the size of an ice-cream cone. They almost always wear reddish, pointed hats.

The USS Enterprise encountered what appeared to be the last colony of gnomes in the 23rd century. Despite initial illusions, it seemed that the last four gnomes were using thier hats (actually advanced matter-rearranging devices) to create illusions and convert Federation colonists into Trolls, the traditional enemies of the Gnomes.

Their aim was to drive outsiders off the planet. (TOS comic: "There's No Space Like Gnome's!")