It was cold and dark outside but my friend and I made ourselves cosy as we drank pear tea and listened to Teresa Teng singing The Moon Represents My Heart, the most celebrated of her more than 1,700 recordings. My friend sang along word perfect and in character, almost moving himself to tears and telling me at the end that he would have it played at his wedding.

“That and Kylie,” he said.

After that we watched a film based on a 500-year-old Chinese opera but set in Suzhou in the 1930s and featuring a lesbian love triangle. It was only a little bit boring and we had an enjoyable few hours together but this was not the evening we had planned.

We had booked to go on a walking tour of Beijing’s old execution grounds at Caishikou and to hear about the ghosts that haunted it. But six hours before it was to begin the organiser messaged to say he had just received word from the authorities that he had to cancel the tour.

His mistake had been to market it as a Halloween haunted walking tour and his was one of numerous events in Beijing called off at short notice over the past few days. A crackdown on Halloween celebrations that started in Shanghai last weekend moved to the capital this week, taking everyone by surprise.

A young mother told me on Thursday that she received a message from the local shopping mall announcing the cancellation of a planned trick-or-treat event. Bars and clubs abruptly called off their Halloween parties and sent out instructions that patrons should not show up in costume on Thursday evening.

In Shanghai last weekend police stopped people dressed in Halloween costumes in the French Concession district, telling them that if they wanted to dress up they should go to the city’s Disneyland. Some were detained briefly until they changed their clothes or removed their make-up but there have been no reports of more punitive action.

The authorities have offered no explanation of the prohibition on Halloween celebrations, which has not been officially announced. But speculation on social media has focused on last year’s celebrations in Shanghai which saw some costumes satirising the zero-Covid policy that locked the city down for three months in 2022.

According to this theory, the authorities were concerned that Halloween could create a platform for people to make political statements through costume. During the demonstrations just before the end of the zero-Covid restrictions protesters showed blank sheets of paper to symbolise their lack of free speech.

Last year some Halloween partygoers dressed in the white hazmat suits worn by the officials who enforced the coronavirus restrictions. Others dressed as controversial celebrities or figures from Chinese history.

None of this explains why the authorities should have initiated such a sweeping crackdown across China’s major cities or why the suppression of events in Beijing came so suddenly and so late in the day. Some commentators on social media believe the motivation to be more narrowly political, linked to the death last year of former premier Li Keqiang.

Li died suddenly of a heart attack in Shanghai on October 27th, 2023, six months after he stepped down as the second most senior figure in the government after Xi Jinping. An economist and a pro-business figure within the leadership, Li was perceived as an internal critic of coronavirus lockdowns.

“On October 27th a large number of people gathered at Julu Road, Huaihai Road, Fuxing Park and other places in Shanghai to spontaneously organise and commemorate the one-year anniversary of Premier Li Keqiang’s death. They have used various western Halloween costumes, such as Trump, as well as [revolutionary democratic socialist] Chen Duxiu and [early 20th century satirical writer] Lu Xun, and various grimace masks to demand civil rights, democracy, and freedom,” a social media post said this week.

“Although it was raining, everyone’s enthusiasm was quite high. The police arrested many people, but it is said that they were released after simple questioning and registration.”

If there was indeed a political dimension to the Halloween celebrations in Shanghai it was marginal almost to the point of invisibility. But the crackdown has caused widespread exasperation, even among those who had no plans to mark the festival.

It has reinforced a perception that a Communist Party leadership shaped by the experience of the Cultural Revolution is increasingly out of touch with the lives of younger generations of Chinese people. Some 40 years after Deng Xiaoping’s reform and opening up, China is a changed society with different preoccupations and expectations, and a younger generation facing economic adversity for the first time.

One young man I know, patriotic to a fault and generally supportive of the system, told me the Halloween crackdown summed up the authorities’ attitude to the young. “It’s like we are cows or horses, they just want us to work and have babies, we should never have any fun,” he said.