was the precious red dye of the Aztecs
When the Spaniards arrived in Mexico in the 1500s, they were amazed by the brilliant red-dyed clothing worn the natives. Europe had red dyes - madder root, lichen, and the kermes insect - but nothing could compare with the brilliant scarlet of the Aztec cloth.
The secret was a tiny insect, the cochineal scale (Dactylopius coccus), that lived on the flattened stems (pads or cladodes) of certain prickly pear cactus (Nopalea cochenillifera and Opuntia). The Aztecs called the dye nocheztli, for they found it on the divine cactus, teo-nochtli.
The dye comes from the female cochineal scales, which are crushed to obtain the purplish pigment their bodies produce. This pigment, an astringent chemical called carminic acid, protects the insect from predation, and yields the brilliant and durable red dye carmine. Interestingly, while these females may live up to three years, the males of the species lack mouthparts and live only a week after hatching - their sole function is to reproduce.
At first the Spanish thought the dried, unprocessed insects were seeds, so they called them grana cochinilla. This accidental misnomer later served the Spanish well, helping them to maintain a monopoly on the dye for a time, which they guarded as a state secret. When explorers from other European nations came to the New World to learn the secret of the dye, they were looking for seeds (grana) instead of insects. The Spanish monopoly on cochineal production was not broken until 1777, when a French naturalist smuggled Mexican cactus pads with cochineal scales to Haiti.
Today, cochineal is still used to produce a wide variety of pigments, including paints, food coloring, clothing dyes, rouge, and lipstick (beware, that might be squished bugs on your lips!).