In 2007, a 13-year-old golden retriever named Alex, who was the subject of a contentious custody suit, was given a court-appointed lawyer to look after his best interests.

In 2006, after Hurricane Katrina — during which some people refused to evacuate because they were worried about their animals — Congress passed a Pets Evacuation and Transportation Standards Act, requiring disaster-preparedness plans to account for pets.

In 2013, Joint Base San Antonio-Lackland unveiled a national monument that honors the service and sacrifice of military working dogs. The bronze sculpture features the four main breeds employed since World War II: the Labrador retriever, the Belgian Malinois, the German shepherd and the Doberman pinscher.

In his often fetching but highly uneven new book, “Citizen Canine,” David Grimm, a deputy news editor at Science magazine, points to such developments as evidence that the social status of dogs and cats has been rapidly evolving. Dog and cat ownership has quadrupled since the mid-1960s, he says, and last year Americans spent “a staggering $55 billion” on their companion animals.

At the same time, he argues, “an equally dramatic transformation has taken place in the legal system”: While early American laws dismissed cats and dogs “as worthless objects that didn't even warrant the meager legal status of property” — they could be stolen or killed without repercussions — today's pets, he says, have “become family in the eyes of the law.” State legislatures have passed tough anti-cruelty acts, imposing fines and prison time on anyone who harms a cat or a dog, and “judges have begun awarding damages for mental suffering and loss of companionship to the owners of slain pets, legal claims typically reserved for the wrongful death of a spouse or child.”

Grimm gives us an engaging account of how dogs and cats came to be our best friends, examining the status various societies accorded them, from ancient Egypt, which revered the cat (Herodotus wrote that Egyptians, faced with a burning building, “appear to be occupied with no thought but that of preserving their cats”) to medieval Europe, which reviled cats as incarnations of Satan and eventually led to the slaughter of so many of them that the rodent population exploded, hastening the spread of the bubonic plague known as the Black Death.

Grimm ultimately rejects the notion — embraced by some — of conferring “personhood” on animals. But not because he has problems with this language or its implications. He rejects it because, he says, we need animals “to remind us of who we are and where we came from.” In the end, he says, “When we turn cats and dogs into people, we lose the animal part of ourselves.”