BEIJING (Reuters) - Attackers drove a vehicle into a government building in China’s unruly far western region of Xinjiang, setting off an explosive device and using knives to kill two people before all three of the assailants were shot dead, state media said on Thursday.

Hundreds of people have been killed in recent years in resource-rich Xinjiang, on the borders of central Asia, in violence between the Muslim Uighur people who call the region home and ethnic majority Han Chinese.

The government has blamed the unrest on Islamist militants, though rights groups and exiles say anger at Chinese controls on the religion and culture of Uighurs is more to blame for the unrest. China denies any repression in Xinjiang.

The Xinjiang government said in a short statement on its main news website the incident occurred just before 5 p.m. (0900 GMT) on Wednesday in Karakax county, deep in southern Xinjiang’s Uighur heartland.

It said “thugs” drove a vehicle into a yard at the county Communist Party offices and detonated an “explosive device”.

The official Xinhua news agency, citing the Ministry of Public Security, later said all three of the attackers were shot dead, but not before they killed a security guard and a government official and wounded three others.

Xinhua described the incident as a “terrorist attack”, and said the attackers also used knives.

The Xinjiang government previously said there were four attackers and that they had only killed one person.

It is difficult for foreign journalists to report in Xinjiang, making it almost impossible to reach an independent assessment of security there.

Dilxat Raxit, a spokesman for the exiled group the World Uyghur Congress, said he doubted the official account.”I strongly doubt the casualty toll and reason for the incident from official reports, which lack transparency,” he said in an emailed statement.

The government has delayed reporting some previous incidents.

An attack on a coal mine in September last year, in which at least 16 died, was not reported by the government until two months later, when it announced its security forces had killed 28 of the “terrorists” involved.

Xinjiang had generally been quiet this year, with no major reported attacks or other violent incidents.