ALBUQUERQUE, N.M. (AP) — A new study says inhabitants in the pre-Hispanic American Southwest often drank caffeinated drinks and traded to get them more than 1,000 years ago.

The study led by University of New Mexico anthropology professor Patricia Crown says researchers found caffeine on sherds from jars, bowls, and pitchers located at archaeological sites throughout the present-day American Southwest.

According to the study, American Indians in the regional got their caffeine fix through holly and cacao-based chocolate beverages. Neither plant species grew in the Southwest.

Researchers believe inhabitant traded with groups in Mexico to get the drinks and that trade lasted for around 700 years. Crown says it is probable the caffeine was consumed as part of rituals. The study is published in the Proceedings of the National Academy of Sciences.