Around 7000 BCE, the indigenous peoples of Mexico and Central America hunted game and gathered plants, including wild chili peppers. Corn was not yet cultivated, so one main source of calories was roasted agave hearts. By 1200 BCE, corn was domesticated and a process called nixtamalization, or treatment with lye, was developed to soften corn for grinding and improve its nutritional value. This allowed the creation of tortillas and other kinds of flat breads. The indigenous peoples of Mesoamerica have numerous stories about the origin of corn, usually related to being a gift of one or more gods, such as Quetzalcoatl.
The other staple was beans, eaten with corn and some other plants as a complementary protein. Other protein sources included amaranth, domesticated turkey, insects such as grasshoppers, beetles and ant larvae, iguanas, and turtle eggs on the coastlines. Vegetables included squash and their seeds; chilacayote; jicama, a kind of sweet potato; and edible flowers, especially those of squash. The chile pepper was used as food, ritual and as medicine.
When the Spanish arrived, the Aztecs had sophisticated agricultural techniques and an abundance of food, which was the base of their economy. It allowed them to expand an empire, bringing in tribute which consisted mostly of foods the Aztecs could not grow themselves. According to Bernardino de Sahagún, the Nahua peoples of central Mexico ate corn, beans, turkey, fish, small game, insects and a wide variety of fruits, vegetables, pulses, seeds, tubers, wild mushrooms, plants and herbs that they collected or cultivated.