Tropical forests are some of the most biodiverse places in the world, but, strangely, plants of the same species are often found separated from each other.

The phenomenon is known as negative density dependence, and has long attracted the interest of researchers.

Now, scientists working in the Panamanian rainforest say the reason plants separate is for survival. Young, similar plants that cluster together are more readily eaten by bugs.

“As the density of plants with similar defenses increases, the loss of leaf area to herbivores also increases, ultimately causing lower growth and increased mortality of understory saplings,” write Dale Forrister from the University of Utah, US, and colleagues.

In a paper in the journal Science, the scientists explore two theories that would account for same-species aversion: competition for resources and attack by herbivores. They find that the latter is the culprit.

Forrister and colleagues looked at species of Inga, a tropical shrub genus with more than 300 species, on Barro Colorado Island in Panama. They considered resource acquisition traits, such as wood density, height, and leaf shape, as well as defensive traits, such as timing and rate of leaf growth.

The researchers also tracked “the chemical similarity between each Inga species and neighboring congeners”.

“Chemical similarity had the largest negative influence on both growth and survival,” they write. “In other words, Inga trees growing near chemically similar neighbours grew more slowly and survived less.”

The team had previously found that “defensive chemistry” is correlated with “herbivore host use,” or, in other words, the chemical make-up of the plant dictates whether it gets eaten.

Together, the findings mean that plants with similar chemistry need to avoid each other in order to reduce insect infestation and death during the sapling stage.

The scientists say most studies on this issue have focused on seeds and seedlings, but the vulnerable sapling stage may be where the critical action happens.

The findings help explain a conundrum: Why biodiversity in rainforests goes against the ‘natural’ order.

“Competition should cause dominant species to increase in abundance until they exclude inferior competitors from a community,” Forrister and his colleagues write.

Negative density dependence “prohibits dominance by any one species and allows species to recover from low density,” they continue.

And that explains why so many species of Inga continue to thrive throughout the Americas, with as many as 40 species at a single location.