IN LATE June, thousands of people throng the streets of Yulin, a city in the southern province of Guangxi, for an annual dog-eating festival. The event is controversial worldwide. Animal-welfare groups claim that 15,000 dogs are inhumanely slaughtered for the occasion every year, most of them pets or strays.

The festival is contentious in China, too. Thousands of people protest online against the festival and demand that dog meat be made illegal, as it has been in Taiwan—in April the island became the first Asian country to ban eating or trading the meat of dogs and cats. Dog-meat sellers in Yulin respond that eating dogs is no different from killing and consuming any other domestic animal. Yulin’s government shuttles back and forth between competing views. Rumours flew that this year it would close down the festival. In the end, it did not. State media quoted local officials as saying they had issued no such order.

In traditional rural China, dogs were guardians or herders, not so often food. In the biggest cities, pet ownership is soaring, as is concern for animal welfare. But in the swathes of China that are neither traditional nor modern, where regulations are elastic and crime is common, the dog-meat market is thriving. It is a case study in unfinished modernisation.

Dog meat is not taboo in China, as it is in most Western countries. But, says Guo Peng of Shandong University, eating dogs has always been uncommon, except in parts of the south and among the ethnic Korean minority, who number 2.3m and mostly live in the north-east. Many Chinese, she says, regard dog meat as a kind of medicine that can regulate the heat of the body. But they do not treat it as a main source of protein. This view is consistent with a survey in 2016 by Dataway Horizon, a polling firm, for a Chinese NGO, Capital Animal Welfare Association. It found that about 70% of Chinese people said they had never eaten dog. Of those who said they had, most claimed it was not by active choice, but because the meat had been served to them on a social occasion.

Over the past two decades, however, dog meat, like drugs, has become a source of criminal income, according to Ms Guo. Sellers in Yulin and elsewhere say their meat comes from dog farms. But when animal-welfare groups have tried to inspect such farms, they have usually been unable to find any. In late June activists intercepted a lorry carrying 1,300 dogs, apparently destined for sale as meat in Yulin (one of the rescued animals is pictured). They suspect many were stolen pets.

Ms Guo has carried out rare research into the dog-meat market, focusing on the coastal province of Shandong. Most of the meat, she found, came from criminals who were going from village to village, using crossbows to shoot dogs with poisoned darts. Some of the hunters were equipped with infrared sights. The meat became contaminated by the poison, but since the business was unregulated, this did not matter to the dealers. Between 2007 and 2011 a third of the dogs in one village, Yaojia, were stolen. Almost every household lost at least one animal.

In for a hound

Hunters got about 10 yuan ($1.30) per kilo of meat, so a medium-sized dog might be worth 70-80 yuan. One hunter interviewed by Ms Guo was a young man raising money to get married. He was making 200 yuan a day, an average income. The meat was shipped to the north-east. Hunters in Shandong and in the neighbouring province of Henan are now thought to supply a large share of China’s dog meat. Since it is stolen, it is cheap to produce. It is more expensive than pork or chicken, but is affordable for many people.

The combination of non-existent regulation and consumer-friendly prices has helped to create a far larger dog-meat market than ever existed in the past. The Yulin festival reflects this recent development. Though its supporters call it a traditional event, the first festival took place in 2009.

Richer parts of China, meanwhile, are adopting more Western attitudes. In Beijing there has been a big increase in dog ownership. Dog-lovers sometimes clash with hunters and meat-sellers.

In Mao’s day, dog ownership by city dwellers was condemned as a “symbol of decadence” and strays were shot on sight. In the capital dogs were banned until 1994 and strictly licensed until 2003. Since then, a relaxation of the rules has allowed ownership to grow by 25% a year, bringing the total number of registered dogs to more than 2m in 2016, says the Public Security Bureau, which issues dog-keeping permits. According to Mary Peng of the International Centre for Veterinary Services, a charity, only 50-60% of dogs in the city and 30% of those in suburbs are licensed. So, she reckons, there may be 4m-6m dogs in Beijing, more than five times as many as in London or New York.

Regulations are still onerous. In the inner city of Beijing a dog licence costs 500 yuan a year—almost ten times as much as in New York. The price includes a rabies shot but is still considered steep. Many owners refuse to register their hounds, leading to worries about disease. According to the World Health Organisation, China has the world’s second-highest death toll from rabies after India—around 2,000-3,000 human fatalities a year. In an attempt to reduce dog numbers and unregistered animals, the capital has joined some other Chinese cities in adopting a one-dog policy: only a single pooch may be registered per household.

Activists from Beijing have caused traffic jams by stopping lorries carrying dogs to slaughterhouses. Last November, they persuaded China’s largest food-delivery company to stop carrying dog-meat meals. In May Zhang Xiaohai of AITA, China’s first registered animal-welfare organisation, went to Yulin to try to encourage local opposition to the festival. He said officials told him that they knew the event was harming the city’s reputation and contributing to the spread of rabies, but were reluctant to ban it. (The local government says it is not involved in the festival.)

China has no national animal-welfare laws. For years the National People’s Congress, China’s rubber-stamp parliament, has discussed one; this year the idea got more public backing than any other proposed legislation, to judge by comments on the government’s news website. But nothing has come of it. China’s dog lovers and dog-meat lovers will be snarling at each other for a while to come.