Zhang Hong, Urumqi's deputy mayor, said the deaths followed demonstrations on Thursday by ethnic Han Chinese demanding punishment of Muslim Uighurs blamed for the July 5 rioting that killed nearly 200 people.
"The riots are a huge surprise to the Chinese authorities"
Ying Chan, University of Hong Kong
"On Thursday, 14 people were injured and sent to hospital and five people were killed in the incidents, including two innocent people," Zhang said.
He did not say what he meant by "innocent" and gave no breakdown of the toll.
Protesters marched again on Friday, and police used tear gas and public appeals to break up crowds of Han who tried to break through to government offices.
There were no deaths in those protests, Zhang said.
Troops have filled the streets and blocked access to Uighur neighbourhoods in an attempt to quell further trouble.
"The riots and protests came as a huge embarrassment to the Chinese government," Ying Chan, the director of journalism and media studies at the University of Hong Kong, told Al Jazeera.
"Because just last week President Hu Jintao spent four days in Xinjiang, his first visit there since July. And earlier this week, the state news agency said the situation was stabilising and tourism coming back."
The protesters say the authorities have failed to stop a number of syringe attacks or to punish the Muslim Uighurs.
But Uighur leaders say members of their community have also been hurt in the attacks.
More than 500 syringe stabbings have been reported which, like the earlier violence, have targeted mostly Han.
Xinhua, the state-run news agency, quoted Zhang as saying the syringe attackers were Uighurs.
In comments broadcast on national television, Meng Jianzhu, Beijing's public security minister, said: "The needle stabbing incident is a continuation of the '7-5' incident, and it's plotted by unlawful elements and instigated by ethnic separatist forces. Their purpose is to damage ethnic unity."
It was the first time the authorities had suggested Uighurs were involved.
The government has, meanwhile, banned "unlicensed marches, demonstrations and mass protests" and will disperse or detain those who disobey, Xinhua said.
Local TV reports said that 476 people had sought treatment for stabbings, although only 89 had obvious signs of being pricked and no deaths, infections or poisonings had occurred.
Pararamilitary police with shields, sticks and submachine guns slung over their backs sealed off People's Square in the centre of Urumqi on Friday.
Ethnic relations in Xinjiang have grown increasingly strained in recent years, with many Uighurs resentful at the migration of millions of Han Chinese into what they see as their homeland.
The Uighurs say the Han have unfairly benefited from the mineral wealth of Xinjiang, a strategically vital Central Asian region with significant oil and gas deposits.
The Han often stereotype Uighurs as lazy, more concerned with religion than business, and unfairly favoured by set-aside quotas for government jobs and university places.