The condemnation of Yulin has contributed to a growing us-against-them mentality here, with many people saying they are being unfairly singled out.

Locals say the moral hypocrisy over the eating of animals is a bottomless grab bag. What about the consumption of beef when cows are considered sacred in India, they say, or guinea pigs in Latin America, or dogs in Korea or turkeys in the United States? What makes eating dog meat any different from eating the flesh of chickens or pigs, they ask?

“I feel like the activists would be making better use of their time addressing issues like the global water shortage or kidnapped children instead of making things more chaotic here,” said Yu Ping, 48, a Yulin resident and a preschool teacher. Ms. Yu, like many residents, insisted that the dogs eaten in Yulin were specially farmed, while animal rights groups say that a large percentage of the dog meat comes from stolen pets or strays.

Dog meat is not widely consumed in China, but it is a long-established part of the diet, particularly in the far south and north. As many as 10 million dogs and four million cats are consumed in China each year, according to animal rights groups.

The processing, like that at any abattoir, is not for the squeamish.

Around 3:30 a.m. on Sunday at Dongkou Market, the main source for dog meat, most of the shops were dark and quiet except for a small slaughterhouse.

A rusty metal cage was tossed from the shop, clanging to a halt near a pile of cages that had been unloaded from a large truck. In one of the cages, four golden-haired dogs were crammed in like Tetris blocks. The dogs crouched silently as they waited to be emptied into a holding pen inside the shop.