China has launched a one-year crackdown to hunt down and punish terrorists in Xinjiang, state media said, after the deadliest attack in years in the far western region with a large Muslim Uighur minority.

Five suicide bombers carried out Thursday morning's attack which killed 31 people at a vegetable market, according to state media.

"The campaign will make full use of political and legal forces, army and armed police in Xinjiang," the official Xinhua news agency said of the crackdown, citing local authorities. The aim, Xinhua said, was to "focus on terrorists and religious extremist groups, gun and explosive manufacturing dens and terrorist training camps. Terrorists and extremists will be hunted down and punished. The government will prevent terrorism and extremism from spreading to other regions." The drive, approved by the central government and a national-level group leading anti-terrorism activity, would last until June 2015 with Xinjiang as the "major battleground".

Thursday's bombing was the second suicide attack in the capital in just over three weeks. A bomb and knife attack at an Urumqi train station in April killed a bystander and wounded 79.

The government had already launched a campaign to strike hard against terrorism in Xinjiang, blaming Islamists and separatists for the worsening violence in the resource-rich western region bordering central Asia. At least 180 people have been killed in attacks across China over the past year.

The attackers ploughed two vehicles into an open market in Urumqi and hurled explosives. Many of the 94 wounded were elderly shoppers, according to witnesses.

"Five suspects who participated in the violent terrorist attack blew themselves up," the Global Times, a tabloid run by the People's Daily, the official newspaper of the Communist Party, reported on Friday. The newspaper said authorities "are investigating whether there were other accomplices".