Dozens of people have been killed and injured in an attack in China's far western Xinjiang region, home to the mainly Muslim Uyghur minority, state media has reported.

Xinhua news agency reported on Tueday that men armed with knives attacked a police station and government offices in Shache county early on Monday.

Xinhua reported police as saying that dozens of Uyghur and Han civilians were killed or injured in a "premeditated terrorism attack".

"Police officers at the scene shot dead dozens of members of the mob," the report said.

Police officers at the scene shot dead dozens of members of the mob. Xinhau news agency report

Al Jazeera cannot independently verify the state news agency's version of events.

Greg Fay, a project manager of the Washington-based Uyghur Human Rights Project, said it was difficult to confirm Xinhua's version of events, and that the Chinese media had "nearly total control of the narrative" from the region.

"This shoot-to-kill policy has yet again been adopted in this most recent anti-terrorist campaign," Fay said. "But we don't really know what happened."

The incident on Monday happened during Eid at the end of the Muslim fasting month of Ramadan, which this year had been "extremely restricted" in Xinjiang, he added.

Al Jazeera reported earlier in July that Chinese Uyghurs had defied Ramadan ban in Kashgar, a city in Xinjiang.

Xinjiang has been beset by violence for years, blamed by the government on rebels the government says are bent on establishing an independent state called East Turkestan.

Beijing commonly blames the minority Uyghurs for carrying out attacks, which have grown in scale over the past year and spread outside the restive region.

Among the latest incidents was a market attack in Xinjiang's capital Urumqi in which 39 people were killed in May, and a knife rampage at a train station at Kunming in China's southwest in March, which killed 29.

Rights groups accuse China's government of cultural and religious repression, which they say fuels unrest in Xinjiang.

In recent months, the Chinese government executed several minority Uyghurs accused of "terrorism".

Rights groups have questioned the secret trials being held to convict the suspects, saying they do not adhere to international standards of justice.