A genetic tweak about 10 million years ago may be responsible for delicious chocolate bars, new research suggests.

The cacao tree's ancient roots suggest it has greater genetic diversity in the wild than previously thought.

"We show for the first time that the source of chocolate, Theobroma cacao, is remarkably old for an Amazonian plant species," study lead author James Richardson, a tropical botanist at the Royal Botanic Garden Edinburgh, Scotland, said in a statement. [7 Sweet Facts About Chocolate]

Send in the clones

Chocolate is made from cacao pods that grow on the Theobroma cacao tree. On its path from bland bean to velvety chocolate bar, cacao goes through a multitude of steps, including fermenting, drying and roasting the pulp, grinding cocoa nibs, extracting and reintroducing cocoa butter and mixing in sugar and milk.

Unfortunately, the vast majority of cacao trees, grown as crops to satisfy the world's $100 billion sweet tooth, are genetically very similar. Genetically homogenous crops are especially susceptible to cataclysmic population collapse. For instance, the banana currently eaten worldwide, known as the Cavendish variety, only rose to prominence after the last cultivar, Gros Michel, was almost completely wiped out by a soil fungus. (However, unlike cacao trees, banana trees are clones of each other, originating primarily from a single plant in Southeast Asia.)

Surprising diversity

In the current study, the researchers analyzed the genome of the cacao tree, which they described today (Nov. 10) in the journal Frontiers in Ecology and Evolution. They found that the Theobroma genus diverged from its closest cousin, Herrania, roughly 12.7 million years ago — right about the time that the majestic Andes Mountains began to rise. The species responsible for the tasty crop emerged a few million years later, and it can be found on both sides of the Andes because the mountains were not yet tall enough to prevent the trees' spread. (Some scientists have suggested that Herrania and Theobroma could have parted ways as recently 5 million years ago, based on the timing of different geological events that affected species diversification, the researchers write in the paper.)

The fact that cacao originated in South America so many millions of years ago was a pleasant surprise.

"After 10 million years of evolution, we should not be surprised to see a large amount of variation within the species, some of which might exhibit novel flavors or forms that are resistant to diseases. These varieties may contribute towards improving a developing chocolate industry," Richardson said.

The new findings hold out hope that some of the cacao trees lurking in the forests of the Amazon could provide the genetic variance needed to fight off disease in the future, the researchers wrote in the paper.

Follow Tia Ghose on Twitterand Google+. Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.