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 as well as 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, and was debated for its medicinal and religious merits, and 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 WWI, chocolate has undergone further developments, creating couverture and white chocolate, while ingredients such as cheaper fats and lecithin were added. Chocolate production increased dramatically, and new markets in Asia and Africa have opened up. 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 $100 billion USD, and production was concentrated among a small set of cocoa processors and chocolate makers.