Chinese police have shot dead 13 attackers in the western province of Xinjiang after they rammed a car into a police station and detonated explosives, Xinhua news agency said.

China has been toughening its response to violent crimeafter a spate of attacks around the country, centred on Xinjiang, the traditional home of Muslim Uighurs.

China has blamed previous attacks on Islamist separatists in the region, who they say are looking to establish an independent state there called East Turkestan. It was not immediately clear who was responsible for Saturday's violence.

"The gangsters drove a truck to ram the building of the public security bureau of Yecheng County in southern Xinjiang and set off explosives. Police shot and killed 13 attackers at the scene," Xinhua said, adding that three police were slightly wounded.

In 2012, seven attackers were shot dead after killing 13 people in a knife attack in Yecheng, also known by its Uighur name of Kargilik, a remote town on the road leading to China's mountainous border with Pakistan.

China has been on edge since a suicide bombing last month killed 39 people at a market in Xinjiang's capital, Urumqi. In March, 29 people were stabbed to death at a train station in the southwestern city of Kunming.

The rise in violence has prompted a crackdown on violent crime. Authorities in Xinjiang have arrested dozens of suspects in recent weeks for spreading extremist propaganda, possessing banned weapons and other crimes.

China also executed over a dozen people for terrorist attacks in the region earlier this month and three for an attack on Beijing's central Tiananmen Square.

Resource-rich and strategically located on the borders of central Asia, Xinjiang has been plagued by violence for years, but exiled Uighur groups and human rights activists say the government's own repressive policies in Xinjiang have provoked unrest, something Beijing denies.

"The crackdown against the Uighur population is making it hard for people to bear," Dilxat Raxit, spokesman for the World Uyghur Congress, the largest group of exiled Uighurs, said.

"Opening fire and killing those resisting, and accusing them of terrorism while skirting the root causes, this will only lead to the situation in the region becoming worse."