NEW YORK — Long before cats became the darlings of Facebook and YouTube, they spread through the ancient human world.

A DNA study reached back thousands of years to track that conquest and found evidence of two major dispersals from the Middle East, in which people evidently took cats with them. Genetic signatures the felines had on those journeys are still seen in most modern-day breeds.

Researchers analyzed DNA from 209 ancient cats as old as 9,000 years from Europe, Africa and Asia, including some ancient Egyptian cat mummies.

“They are direct witnesses of the situation in the past,” said Eva-Maria Geigl of the Jacques Monod Institute in Paris. She and colleagues also looked at 28 modern feral cats from Bulgaria and east Africa.

It’s the latest glimpse into the complicated story of domesticated cats. They are descendants of wild ancestors that learned to live with people and became relatively tame – though some cat owners would say that nowadays, they don’t always seem enthusiastic about our company.

The domestication process may have begun around 10,000 years ago when people settled in the Fertile Crescent, the region that includes the eastern shore of the Mediterranean Sea and land around the Tigris and Euphrates rivers. They stored grain, which drew rodents, which in turn attracted wild cats. Over time, these wild felines adapted to this man-made environment and got used to people.

A previous study had found a cat buried alongside a human some 9,500 years ago in Cyprus, an island without any native population of felines. That indicates the cat was brought by boat and it had some special relationship to that person, researchers say.