Citrus trees migrated from the Himalayas to the rest of the world after sudden changes in the climate 6 to 8 million years ago, according to new research. As citrus spread, it changed, eventually bringing sweet orange juice to our kitchen tables.

To get a better understanding of where citrus trees came from, scientists have mapped the genomes of over 50 varieties of citrus fruit, from the clementine mandarin to the Buddha’s hand citron. They found that today’s citrus trees derive from at least 10 ancestral species that originated in the southeast foothills of the Himalayas, in a region that includes the eastern area of Assam, northern Myanmar, and western Yunnan, according to a study published today in Nature. The Himalayas, famously, grow — currently at the rate of about 0.4 inches (1 centimeter) a year — and they were growing back then, too. When the mountain range got high enough to change the climate, millions of years ago, the monsoons weakened and the weather got drier. This triggered the spread of the citrus trees through southeast Asia, where new species evolved to adapt to different habitats.

“It’s both a combination of human ingenuity and also natural diversity.”

Citrus trees are currently among the most widely cultivated fruit trees in the world, but until now, it wasn’t clear precisely where citruses came from or how they spread around the world. Fortunately, genetics can show scientists glimpses of citrus’s history, says study co-author Daniel Rokhsar, a geneticist at UC Berkeley. But today’s study doesn’t just provide a quirky history of how citruses spread through time; it also gives breeders a genetic road map to create new varieties of citruses that can taste good and resist pests.

“When you look at the diversity of citrus that you see in your neighborhood grocery, that is the result of thousands of years of human breeding, superimposed on millions of years of natural diversification,” Rokhsar tells The Verge. “It’s both a combination of human ingenuity and also natural diversity, and we need them both.”

Scientists have long known that citruses originally came from Asia. The fossil of a citrus leaf found in southwestern China, for instance, shows that a common ancestor existed in the area about 8 million years ago. But how exactly this grandparent of all citruses spread and diversified to give rise to today’s many varieties was a mystery — until today. To get the answers, researchers analyzed the genomes of 58 existing citrus varieties, such as the Mexican lime, Kumquats, and Cleopatra mandarins. They also used two closely related species that aren’t citrus, to better understand which genetic changes happened in which lineage.

Taken together, those fruits’ genes reveal an exciting origin story that began in the same area where the fossil leaf was found. About 8 to 10 millions years ago, ancestral citrus forests grew at the foot of the Himalayas, but then something changed. Over a period of hundreds of thousands of years, the monsoons weakened, triggering a migration of plants and animals out of the area. “This must have been a dramatic change in climate and habitats,” Rokhsar says. The citrus trees rapidly spread to southeast Asia and from there, to the rest of the world, including to Australia about 4 million years ago.

“a dramatic change in climate and habitats”

Out of this mass migration, over time, at least 10 ancestral citrus species emerged. The crossing of all these species in different parts of the world eventually gave rise to many of today’s fruits. For instance, today’s bitter orange, whose rind is used to make marmalade, is a mix of two ancestral species: wild mandarins, which are typically small, sour, and easy to peel, and wild Pomelo, which are large and have extremely thick rinds. Whether this mix happened naturally or by the hand of some skilled farmers likely thousands of years ago isn’t known, Rokhsar says. But we do know that as far back as 4,000 years ago, Chinese citrus farmers mixed citrus varieties until they got sweet-tasting oranges similar to the ones we eat today. As those fruits spread through trade routes to the rest of the world, new varieties were created. In the early 1900s, for instance, an accidental hybrid in the garden of a French missionary priest in Algeria, Father Clement Rodier, is thought to have given rise to the clementine, which is named after him.

This information can also help breeders in a very concrete way: citrus fruits are threatened by a variety of diseases. (Citrus greening, for instance, has devastated millions of acres of crops in the US.) A detailed genetic road map of the many different citrus varieties around today can help researchers determine which fruits are resistant to pests, and which are sweet and juicy. And that allow breeders to create new varieties that are immune and taste good. Similar genetic work has been done with tomatoes, which have lost much of their flavor through time in exchange for yield and firmness. “We need to figure out the tricks,” Rokhsar says.

Until then, enjoy the sweet oranges and tangy grapefruit available today, knowing that they all originally came from the Himalayas millions of years ago. That’s something else to talk about during brunch.