The history of chocolate dates back over 5,000 years, when the cacao tree was first domesticated in present-day southeast Ecuador. Soon introduced to Mesoamerica, it gained cultural significance as an elite drink among different cultures, including the Mayans and Aztecs. Cacao was extremely important: considered a gift from the gods, it was used as a currency, medicinally and ceremonially. Chocolate was often associated with the heart and was believed to be psychedelic. It is unclear when chocolate was first drunk, and there is evidence of Mesoamerican groups drinking an alcoholic drink made by fermenting the pulp around cacao seeds.
Spanish conquistadors encountered chocolate in 1519 and brought it to Spain as a medicine. From Spain, it gained popularity among the European elite over the following three centuries, was debated for its medicinal and religious merits, and was understood as an aphrodisiac. In the 19th century, technological innovations completely changed chocolate, from a drink for the elite to a solid, milky block increasingly eaten by the public. That century saw the rise of Swiss and British chocolate makers, and production was industrialized.
Since World War I, chocolate has developed further, creating couverture and white chocolate, while manufacturers added ingredients such as cheaper fats and lecithin. Chocolate production has increased dramatically, and new markets in Asia and Africa have opened. Attitudes towards the quality of chocolate, and the ethics of its production have shifted, as awareness of child labor has risen. As of 2018, the global trade of chocolate was worth more than US$100 billion, and production was concentrated among a small set of cocoa processors and chocolate makers.