It was the night before the summer solstice, and the tables at a streetside food stall here were set for the annual feast: steamed pumpkin, sautéed morning glory, smashed cucumbers and cold-skin rice flour noodles. At the center of each table were the two traditional dishes most essential to the celebration here: fresh lychees and heaping bowls of stewed dog, pungent with ginger, garlic, dried orange peels, bay leaves and fennel.
It is this last dish for which Yulin has become notorious, thanks to an annual dog meat festival that ended Monday, and the locals have heard enough, thank you.
"Why do people always pick on Yulin?" asked Tang Chengfei, 24, a recent university graduate who was sitting at one of the tables. "Haven't you seen how the Japanese eat live bullfrog sashimi?"
Indeed, it is the perceived hypocrisy of the critics that seems to most annoy residents of this bustling city of seven million in the southern region of Guangxi, which borders Vietnam.
"I understand the other point of view," Mr. Tang said. "Many people feel a special bond with dogs. But we grew up around dog meat. For us, it's normal."
Yulin, whose lush subtropical surroundings are said to be the birthplace of the legendary imperial beauty Yang Guifei, has become the target of a fast-growing animal rights campaign, which has made its residents feel increasingly under siege and at times defensive.
Led by domestic and international activists, animal lovers have called on local government officials and the Chinese public to put an end to eating dog meat and to the often gruesome practices that accompany the nation's largely unregulated dog meat trade. More than 10,000 dogs are said to be served at the summer solstice celebrations in Yulin each year.
Celebrities like Ricky Gervais and Gisele Bündchen have rallied behind the viral social media hashtag #StopYulin2015, while an online petition addressed to the Guangxi governor and China's minister of agriculture had gathered more than four million signatures by Tuesday.
"Dear Morons: Stopping the #YulinDogMeatFestival is less to do with them being dogs & more to do with them being tortured and skinned alive," Mr. Gervais wrote on Twitter last week.
In China, where the issue of animal rights is given more space for debate relative to most grass-roots causes, opposition to the festival has become increasingly vocal.
Over the last few weeks, millions of messages condemning the culinary tradition have flooded Chinese social media. Protests and vigils organized by animal rights advocates were held across the country over the three-day holiday weekend, while more than 40 activists from around the world traveled to Yulin last week to champion the cause, many for the second or third year in a row.
The campaigners notched a big win last year when the Yulin city government, in the face of mounting criticism, distanced itself from the festival by declaring that it was not a sponsor and that it would strictly enforce food safety regulations.
Read MoreWalmart: New animal welfare, antibiotics positions
Despite the rapid growth of the movement, however, animal rights advocates say they are encountering increasing difficulties communicating their message to the people who matter most: the residents of Yulin.
"The environment is much more hostile than ever before," said Andrea Gung, the Taiwanese-American founder of the Duo Duo Animal Welfare Project, based in California, who visited the festival again this year. "Before, the dog meat sellers might cut off a piece of dog flesh and throw it near you. Now they are much more aggressive. The undercover police had to step in to protect me."
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.
Through an open door, a man in a white T-shirt could be seen working silently in dim fluorescent light. With a small club he bludgeoned dog after dog, pausing periodically to move the dazed animals with tongs clamped around their necks.
More from The New York Times:
South Korean novelist apologizes in wake of plagiarism accusation
Paul Krugman: Slavery's long shadow
The obtuse triangle
In the back alley behind the slaughterhouse, five men, some shirtless, worked with boiling vats of water and blowtorches to prepare the carcasses for Yulin's specialty, crispy skin dog meat.
A small group of animal rights activists stood silently outside in the alley, documenting the scene with photos and video to share with the news media and with lawyers who are gathering evidence for a potential court case. Behind them, a group of men who did not identify themselves were shooting video of the activists, and later followed them back to their hotel.
By afternoon, Dongkou Market was open, and the scene was transformed. The range of food offerings on display was impressive, from everyday vegetables to ram heads, about $8 each, and live civets, which were selling for as much as $580 an animal. Farther down the market, across from the now-silent slaughterhouse, butchers lined across three aisles hacked away at gold-skinned dog carcasses on thick wooden blocks, as customers, some still sitting on their motorbikes, placed orders for dog meat at $3.50 a pound.
Not far away, a commotion erupted at the outdoor animal market. Yang Xiaoyun, a 65-year-old animal rights activist, had arrived, bracing herself for yet another day of dealing with dog traders looking to capitalize on her willingness to pay above-market prices to rescue dogs and cats.
On Saturday, Ms. Yang, a widow who runs an animal shelter in Tianjin, had spent more than $1,600 to rescue about 30 dogs and 60 cats. Her actions have drawn criticism from other activists who say that it only encourages dog traders to set aside surplus stock for Ms. Yang to buy.
"A life is a life," Ms. Yang says.
On Sunday, however, she was forced to leave the market after being swarmed by passers-by and traders threatening to torture the animals unless she bought them. As she drove away to the temporary shelter she had set up to house her rescued animals, the crowd of dog traders continued with their taunts.
"We are also dog lovers!" they yelled. "We are dog meat lovers!"