Chinese state media say 37 civilians were killed by a gang in Xinjiang, with 59 attackers killed by security forces.
The incident happened on 28 July but this is the first definitive death toll released by Xinhua news agency.
Xinhua says 215 attackers armed with knives and axes were arrested after they stormed a police station and government offices.
But an Uighur rights group says police opened fire on people protesting against a Ramadan crackdown on Muslims.
At the time, Xinhua reported the incident in the towns of Elixku and Huangdi in Shache county as a "terror attack" and said police had shot dead many attackers.
It said 30 police cars had been damaged or destroyed and "dozens" of Uighur and Han Chinese civilians had been killed or injured.
"This was a serious terrorist attack incident which has links to domestic and overseas terrorist organisations and was organized, premeditated, carefully planned and evil," said a statement from the Xinjiang government, posted on its website on Sunday.
The US-based activist group Uyghur American Association (UAA), however, said sources in the region had told them that local Uighurs had been protesting at the time of the "attack".
The UAA said the protest was "against Chinese security forces' heavy-handed Ramadan crackdown and extrajudicial use of lethal force in recent weeks in the county".
Neither account of the violence could be independently confirmed.
Tensions between Uighurs and Han Chinese migrants have been growing for several years, with some Uighurs opposing Chinese rule in Xinjiang.
In recent months there has been an upsurge in Xinjiang-linked violence that authorities have attributed to Uighur separatists and authorities have stepped up security operations in the region.
Last Wednesday, the imam of China's largest mosque, in the city of Kashgar in Xinjiang, died after reportedly being stabbed after morning prayers.
Jume Tahir, 74, had been appointed imam of the 600-year-old mosque by China's ruling Communist Party and he was a vocal public supporter of Chinese policies in the region.