Image copyright Getty Images Image caption Chinese police on a past patrol in Xinjiang province

Chinese police have shot dead four people who attacked a Communist Party building in western Xinjiang province, local government officials say.

The four drove a vehicle into the compound in Karakax county, and set off explosives that killed one person and injured three others, they said. State media said it was a terrorist attack.

The area, predominantly Muslim Uighur, has suffered years of unrest.

The authorities blame the history of violence on Islamist militants.

Human rights and exiled Uighur groups accuse the government of repressing the Muslim community.

State news agency Xinhua did not specify whether the four people were killed by authorities on the spot or later in the day.

Last month Chinese authorities began confiscating passports from people in the region, saying it was a move to combat violence.

Uighurs, which makes up about 45% of Xinjiang's population, have often complained about having restrictions put on their freedom of movement.

Uighurs and Xinjiang province

Image copyright Getty Images Image caption Two Uighur women pass Chinese paramilitary policemen in China's Xinjiang region