When we think of the Amazon rainforest, we tend to think of one of two things; either a pristine tropical paradise bursting with biodiversity, or a threatened area that’s being devoured for agricultural purposes.

The truth, as is so often the case, likely lies somewhere between those extremes.

In a paper published on Thursday in Science, researchers found evidence that ancient civilizations may have shaped the rainforest’s ecology, cultivating useful fruit-bearing species like cacao and peach palm. But they didn’t farm the Amazon in the way we do today, with large swaths of the Amazon getting cut down or burned and replaced with sweeping soybean fields and colossal cattle farms. Instead, the domesticated crops of the past were incorporated into the jungle ecosystem.

These domesticated species weren’t spread willy-nilly throughout the rainforest. Instead, lead author Carolina Levis and co-authors found that many domesticated species appear more often in close proximity to archaeological sites, indicating a connection between the people who lived in those sites and the plants that surrounded them.

Levis and colleagues compared a database of the biodiversity of over 1100 plots of land in the Amazon to a database of archaeological sites, and found that the relative abundance and richness of domesticated plants went up close to some of the identified archeological sites in the region.

Levis hopes to continue her research into the nature of the interaction between the plants and ancient peoples who lived in the area. There’s still a lot to learn about when and how different peoples may have begun domesticating these useful crops. And it could be that some locations were more into farming than others. The researchers still don’t know whether there was any particular culture or group that was associated with spreading any one of the many domesticated crops.

“We have different types of archaeological sites in the Amazon,” Levis says. “We have sites with ceramics, we have sites with dark earth, we have sites with mounds.”

The researchers also want to tease out distinctions between the domestication of plants in the past, in pre-Columbian societies, and the way people living in the Amazon right now manage their crops.

“These people are still domesticating and managing the forests,” Levis says. “We don’t know how they are doing that.”

Levis thinks this research might also prove useful to archaeologists. If there is a distinct link between these crops and archaeological sites, then it could help researchers use vegetation to find ancient human settlements. After all, a cacao tree is easier to spot in a forest than an overgrown archeological site.

Overall, Levis hopes that we can learn from how peoples in the past managed the Amazon, and maybe incorporate some of those lessons into our current agricultural practices.

“The distribution of these species now are located in these areas where many areas of the Amazon are being destroyed,” Levis says. “Maybe we can use these species to show that the forest holds many useful plants, and can be used for maintaining the forest—not destroying it to produce exotic crops.”