The BBC's Quentin Sommerville, in Urumqi, says the Xinjiang authorities have been under intense pressure to sort the crisis out as soon as possible amid the embarrassment of Mr Hu having to cancel his G8 attendance.
Call for calm
Urumqi's Mayor Jerla Isamudin said at a press conference in the city: "Under the correct leadership of the regional party committee and government... the situation is now under control."
AT THE SCENE: 8 JULY
Quentin Sommerville, BBC News, Urumqi
Here in Urumqi's Uighur Muslim neighbourhood, just on the edge, many hundreds of paramilitary police are on the move. They are seeking to separate this mainly Muslim part of the city from Han Chinese.
Riot police are all around with shields, helmets, some are carrying semi-automatic weapons, others have clubs. They are lining up across the streets to separate these two sides.
We haven't seen any violence yet, we did see some Han Chinese running with batons, they were chased down a side street but this is massive deployment of troops on a scale this city hasn't seen in a very, very long time. It feels like martial law in everything but name.
The city's Communist party boss, Li Zhi, told the same press conference that the government would execute all those found guilty of killings during the riots.
China carries out more state executions that any other country, and anyone convicted of murder in a riot faces an almost certain death sentence.
The Associated Press news agency quoted Mr Li as saying that many people accused of murder had already been arrested and that most of them were students.
More than 1,400 people are thought to have been arrested over the violence.
Mr Li also appealed for calm.
"Everyone, and particularly the Han people, should show restraint," he said.
Thousands of security personnel had poured into Urumqi to try to quell the rioting.
Our correspondent says the situation in the city is virtually one of martial law.
Despite the security presence and calls for calm, there were reports of fresh violence on Wednesday.
Reuters news agency said a crowd of about 1,000 Han Chinese had faced off with security forces, with some angry that police were arresting young Han men.
AFP reporters also said they had seen fresh violence, including one attack on a Uighur man by Han Chinese.
They said the man was beaten and kicked by about six people as dozens of Han Chinese yelled encouragement, before police moved in to end the attack.
The Chinese president had been expected to join the G8 talks on Thursday.
Instead he flew home from an airport in Pisa, leaving officials to represent him at the summit. A state visit to Portugal was postponed.
Chinese media showed both Han and Uighur wounded in hospital
The violence began on Sunday when Uighurs rallied to protest against a deadly brawl between Uighurs and Han Chinese several weeks ago in a toy factory in southern Guangdong province.
XINJIANG: ETHNIC UNREST
Main ethnic division: 45% Uighur, 40% Han Chinese
26 June: Mass factory brawl after dispute between Han and Uighurs in Guangdong, southern China, leaves two dead
5 July: Uighur protest in Urumqi over the dispute turns violent, leaving 156 dead and more than 1,000 hurt
7 July: Uighur women protest at arrests of men-folk. Han Chinese make armed counter-march
8 July: President Hu Jintao returns from G8 summit to tackle crisis
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.