Mosques in the riot-hit capital of China's northwestern Xinjiang province have been ordered to stay closed for Friday prayers in the wake of recent ethnic violence, media reports quoted Chinese officials as saying.

A Uighur man walks by an armoured personnel carrier on Thursday outside a main mosque in Urumqi, in China's Xinjiang province.A Uighur man walks by an armoured personnel carrier on Thursday outside a main mosque in Urumqi, in China's Xinjiang province. (Nir Elias/Reuters)

An official who identified herself as a government worker but refused to give her name was quoted as saying public safety prompted the decision to close mosques in Urumqi. The officials said, "People should stay at home today and pray."

At least 156 people have died in Xinjiang since Sunday in ethnic violence between the Uighurs — an ethnically Turkic, predominantly Muslim group who make up the majority in the northwestern province — and the Han Chinese ethnic group who dominate in the country as a whole.

Separately, officials in the province's southwestern city of Kashgar have told visiting journalists that they and other foreigners had to leave the city.

The city's foreign affairs office said that although the city has had no unrest, the decision was made to ensure the safety of the visitors.

The protests started in Urumqi when demonstrators gathered to demand justice for two Uighurs killed in June during a fight with their Han co-workers at a factory in southern China.

The demonstration turned into a riot, as armed Uighur mobs clashed with police and passersby, as well as setting ablaze or otherwise damaging hundreds of vehicles, stores and street vendor stalls.

In response to the riot, hundreds of Han Chinese rampaged through the city Tuesday with sticks and meat cleavers, looking for Uighurs and revenge.

Meanwhile, the unrest spread to other cities in the region.

Officials have said that more than 1,000 have been injured and about 1,400 have been detained in the unrest.

Relations between the Uighurs and the Han Chinese have often been tense. Many Uighurs feel they're discriminated against by the government in Beijing and a Uighur separatist movement has existed for decades.

With files from The Associated Press