The rampage in Kunming transfixed the nation, with television broadcasts, websites and newspapers offering gruesome pictures and harrowing descriptions. On Sunday, China’s Communist Party leadership vowed to take tougher measures against the perpetrators of such violence. “This gang of terrorists was cruel without any humanity,” Meng Jianzhu, the party leader who oversees domestic policing and security, told Phoenix Television, a Hong Kong-based broadcaster. “They completely abandoned their conscience. We must strike hard against them according to the law.”

But experts said that if the official accounts were correct, the attack appeared to expose a serious security lapse and raises a troublesome question for President Xi: Why have the government’s increasingly tough policies so far failed to stanch the violence in Xinjiang, which has now spilled over into a distant province with no recent history of major ethnic unrest?

“As a single incident, you can say that this is the most brutal, cruel incident we’ve seen from Xinjiang,” Rohan Gunaratna, a professor at Nanyang Technological University in Singapore who studies terrorism in Asia, including China, said in a telephone interview. Over several days in July 2009, at least 200 people, many from the Han majority, died in ethnic bloodshed in Urumqi, the regional capital of Xinjiang. In the days that followed the rioting, an unknown number of Uighurs are said to have died in vigilante attacks.

“Absolutely, it’s an intelligence failure,” Professor Gunaratna said of the Kunming attack. “But this is a natural progression of the developments in Xinjiang, because I would estimate that in the last 12 months there have been over 200 attacks there, maybe even more. It is getting worse.”

The Uighurs are a Turkic people who mostly follow moderate traditions of Sunni Islam, and culturally have more in common with similar people across Central Asia than with Han Chinese. In Xinjiang, Uighurs make up a little under half of the population of 22 million, and Han Chinese, who have been encouraged to migrate there, now account for 40 percent, according to government data.

The attack is particularly alarming because it happened far from Xinjiang and, like a smaller attack in Beijing in October, could augur more attempts by alienated Uighurs to strike beyond their home region, said Pan Zhiping, a professor at Xinjiang University who studies unrest in the region. In October, a group of Uighurs drove a vehicle into a crowd near Tiananmen Square, in Beijing, killing two people and injuring 40.