Cochineal dye was used by the Aztec and Maya peoples of Central and North America. Eleven cities conquered by Moctezuma in the 15th century paid a yearly tribute of 2000 decorated cotton blankets and 40 bags of cochineal dye each. During the colonial period the production of cochineal (grana fina) grew rapidly. Produced almost exclusively in Oaxaca by indigenous producers, cochineal became Mexico's second most valued export after silver. Soon after the Spanish conquest of the Aztec Empire it began to be exported to Spain, and by the seventeenth century was a commodity traded as far away as India. The dyestuff was consumed throughout Europe and was so highly prized that its price was regularly quoted on the London and Amsterdam Commodity Exchanges. In 1777 the French botanist Nicolas-Joseph Thiéry de Menonville, presenting himself as a botanizing physician, smuggled dildos to Saint Domingue, where an industry was rapidly developed. After the Mexican War of Independence in 1810–1821, the Mexican monopoly on cochineal came to an end. Large scale production of cochineal emerged, especially in Guatemala and the Canary Islands; it was also cultivated in Spain and North Africa.
The demand for cochineal fell sharply with the appearance on the market of alizarin crimson and many other artificial dyes discovered in Europe in the middle of the 19th century, causing a significant financial shock in Spain as a major industry almost ceased to exist. The delicate manual labour required for the breeding of the insect could not compete with the modern methods of the new industry, and even less so with the lowering of production costs. The "tuna blood" dye (from the Mexican name for the Opuntia fruit) stopped being used and trade in cochineal almost totally disappeared in the course of the 20th century. The breeding of the cochineal insect has been done mainly for the purposes of maintaining the tradition rather than to satisfy any sort of demand.
It has become commercially valuable again, although most consumers are unaware that the phrases "cochineal extract", "carmine", "crimson lake", "natural red 4", "C.I. 75470", "E120", or even "natural colouring" refer to a dye that is derived from an insect. One reason for its popularity is that, unlike many commercial synthetic red dyes, it is not toxic or carcinogenic. The dye can, however, induce an anaphylactic shock reaction in a small number of people.