Scientific evidence shows that people domesticated cats long before the ancient Egyptians. An article published in USAToday on Dec. 16, 2013, talks about scientists working in a Stone Age site in China, who have discovered something that sheds light on the time when cats and people were developing their relationships.
It's long been known that cats were domesticated somewhere in the Near East. Archaeologists found a site on Cyprus with a cat buried with a human over 9,000 years ago. There's all sorts of evidence that humans and cats lived together in Egypt as long as 4,000 years ago. The site in China, at Quanhucan, has cat bones that help to bridge that gap, as they are more than 5,000 years old.
This particular site provides some details in the ways that cats came to live with people, and how we came to depend on each other. Cats were "the animals of farmers," rather than of hunters, as cats helped control rodent populations in and around farms.
Domesticating any species takes generations upon generations. It doesn't just happen, and is very different from taming. A domesticated animal is one where people have modified their instinctive behavior by keeping them close, or even inside, human habitations, over long periods of time. Taming is subduing a wild animal so that it's mellow around people, but the animal keeps its wild instincts. This is the main reason big cats, like lions, tigers, even cougars and bobcats, don't make good pets.
The ancestors of our cute, cuddly, furry friends weren't looking for companionship when they first approached humans. This happened in ancient Sumer, at the time we first developed agriculture. The cats were looking for food. Specifically, agriculture drew a lot of rodents into a single area, which meant a veritable, never-ending feast for the cats of the time. It's thought that natural selection maintained the cats that tolerated humans coming close, and let the cats that feared humans to fade away.
Because of that, some scientists think that cats domesticated themselves, rather than people actively domesticating them the way that we did with cattle, sheep, goats, and even dogs.
The cats found in China weren't pets. They were likely just farm animals. But they do appear to be an important piece of the puzzle in the domestication process.