Place a housecat next to its direct ancestor, the Near Eastern wildcat, and it may take you a minute to spot the difference. They’re about the same size and shape, and, well, they both look like cats. But the wildcat is fierce and feral, whereas the housecat, thanks to nearly 10,000 years of domestication, is tame and adaptable enough to have become the world’s most popular pet. Now scientists have begun to pinpoint the genetic changes that drove this remarkable transformation. The findings, based on the first high-quality sequence of the cat genome, could shed light on how other creatures, even humans, become tame.

“This is the closest thing to a smoking gun we’ve ever had,” says Greger Larson, an evolutionary biologist at the University of Oxford in the United Kingdom who has studied the domestication of pigs, dogs, and other animals. “We’re much closer to understanding the nitty-gritty of domestication than we were a decade ago.”

Cats first entered human society about 9500 years ago, not long after people first took up farming in the Middle East. Drawn to rodents that had invaded grain stores, wildcats slunk out of the deserts and into villages. There, many scientists suspect, they mostly domesticated themselves, with the friendliest ones able to take advantage of human table scraps and protection. Over thousands of years, cats shrank slightly in size, acquired a panoply of coat colors and patterns, and (largely) shed the antisocial tendencies of their past. Domestic animals from cows to dogs have undergone similar transformations, yet scientists know relatively little about the genes involved.

Researchers led by Michael Montague, a postdoc at the Washington University School of Medicine in St. Louis, have now pinpointed some of them. The scientists started with the genome of a domestic cat—a female Abyssinian—that had been published in draft form in 2007, then filled in missing sequences and identified genes. They compared the resulting genome with those of cows, tigers, dogs, and humans.

The analysis, published online this week in the Proceedings of the National Academy of Sciences, revealed 281 genes that show signs of rapid or numerous genetic changes—a hallmark of recent selection—in domestic cats. Some appear to be involved in hearing and vision, the senses that felines rely on most. Others play a role in fat metabolism and are likely an adaptation to cats’ highly carnivorous lifestyle.

But the most intriguing findings came when the team sequenced the genomes of 22 domestic cats—representing a wide variety of breeds and locations— and compared them with the genomes of two Near Eastern and two European wildcats. The researchers uncovered at least 13 genes that changed as cats morphed from feral to friendly. Some of these, based on previous studies of knockout mice, seem to play a role in cognition and behavior, including fear responses and the ability to learn new behaviors when given food rewards. “That jibes with what we know about the domestication of cats,” Montague says, “because they would have needed to become less fearful of new locations and individuals, and the promise of food would have kept them sticking around.”

“This is my favorite part of the paper,” says Kerstin Lindblad-Toh, a leading comparative genomicist at Uppsala University in Sweden who was not involved in the work. She notes that a few of the genes the team identified code for glutamate receptors, which play a key role in learning and memory and may have been selected in humans as well. “We’re hitting on genes that allow our brains to develop and make us interact socially.”

The team also found five genes in domestic cats that influence the migration of neural crest cells, stem cells in the developing embryo that affect everything from skull shape to coat color. This supports a recent proposal that such cells may be the master control switches of domestication, explaining why domestic animals share common traits, such as smaller brains and certain pigmentation patterns—a mystery first noted by Charles Darwin.

If cats sport genetic changes akin to those of other domestic animals, why are they still a bit wilder than our other favorite domesticate, the dog? Co-author William Murphy, a geneticist at Texas A&M University, College Station, says the cat genome appears to have undergone less intense and more recent evolutionary pressure than that of dogs; that’s not surprising, considering that dogs may have lived with us for up to 30,000 years. “Cats were not selected for a purpose like dogs and other domesticates,” Murphy speculates. “They just hung out, and humans tolerated them.”

Still, Larson doesn’t think it’s fair to call cats “semi-domesticated,” as the authors do in their paper. “I’ve got two cats at home, and they’re as domesticated as any animal on earth,” he says. “There are homes where cats just sit on the couch, ignoring the dogs and primates that should be a major threat to them. That’s asking a lot of a wild carnivore.”