Cochineal, a crimson dye from female beetles that live on cacti native to Mexico and South America, had been used by the Aztec and Mayan peoples of Central America since 1000 B C. The Spanish invaders were amazed at the brilliance of the red fabrics worn by the people of the region and soon were shipping the dried bodies of the female beetle to Europe. The dye was known as 'red grain' and took 17,000 dried beetles to make 1 ounce of dye stuff.
The Spanish kept the source of this very valuable product a secret through most of the 17th century. Silver was the only commodity from New Spain that was more valuable. Wool dyed red with cochineal was especially brilliant, more so than the fibers available in pre-Hispanic Central and South America; cotton, agave and yucca.
During America's Revolutionary War, the American troops engaged in guerrilla warfare were able to pick off the British officers and cause panic and confusion amongst the soldiers because the 'red coats' of the officers were dyed with cochineal and much brighter than the madder dyed coats of the soldiers.
After Mexican independence, some production ( cacti plants and beetles) was moved to the Canary Islands. Cochineal fell out of favor for most textile dyeing with the advent of aniline dyes but is seeing a resurgence today as a natural food coloring.