TURRIALBA, Costa Rica — The trees of the International Cacao Collection grow here in an astonishing diversity of forms, bearing skinny cacao pods with scorpion-stinger protrusions, spherical green pods that could be mistaken for tomatillos, oblong pods with bumpy skin resembling that of the horned lizard — all in colors ranging from deep purple to bright yellow.

Within each of these pods are seeds that yield something beloved by billions: chocolate.

But despite this diversity, few cacao varieties are widely cultivated, and that’s a problem: Like many other crops, cacao is under constant threat from diseases and environmental challenges exacerbated by our tendency to grow only a few varieties with similar or identical genetic traits and defects.

“Most varieties produced worldwide belong to a narrow set of clones selected in the forties,” said Wilbert Phillips-Mora, who oversees this collection of 1,235 types of cacao trees and heads the Cacao Genetic Improvement Program at C.A.T.I.E. (an acronym in Spanish for the Tropical Agricultural Research and Higher Education Center).

A narrow gene pool means that most commonly cultivated varieties of cacao are susceptible to the same diseases, and these blights can spread quickly.