Horse breeding records are some of the most impressive efforts to chronicle animal lineages in human history, with some stretching back thousands of years. Yet decoding the genetic origins of today’s horses has proved remarkably difficult. Now, a new study finds that nearly all modern horse breeds can be traced to two distinct, ancient Middle Eastern lines that were brought to Europe about 700 years ago. Understanding how these horses were traded, gifted, or stolen could shed light on human history as Eastern and Western civilization commingled and collided.

People first domesticated horses some 6000 years ago in the Eurasian Steppe, near modern-day Ukraine and western Kazakhstan. As we put these animals to work over the next several thousand years, we selectively bred them to have desirable traits like speed, stamina, strength, intelligence, and trainability. People have tracked horse pedigrees for almost as long as we have kept them, but it wasn’t until the 1700s that detailed “studbooks” emerged in Europe to keep tabs on which horses fathered which foals and what characteristics the foals inherited.

The new study’s lead author, Barbara Wallner, an evolutionary biologist at the University of Veterinary Medicine in Vienna, paired these old, yet meticulously kept data