Supporters of the sacked governor of the Afghan city of Herat, Ismail Khan, have set fire to local UN offices on the second day of unrest there.
Herat province has long been a stronghold for Khan
Unconfirmed reports say at least seven supporters of the ousted governor were killed on Sunday in clashes with US and Afghan government troops and police.
A governor backed by Afghan President Hamid Karzai has taken office in a ceremony in the western city.
Mr Khan has ruled Herat for decades and has resisted the president's authority.
Hundreds of demonstrators ransacked the UN compound on Sunday, setting fire to parts of the buildings and throwing stones, reports say.
US and government troops helped staff to reach safety and tried to keep back the crowds with tear gas.
The compound houses offices of the UN High Commissioner for Refugees and the UN Assistance Mission.
Witnesses reported bursts of gunfire as smoke from burning cars and other wreckage rose over the centre of Herat.
Two people are said to have been killed in protests overnight.
A doctor at Herat's central hospital said seven protesters' bodies had been brought in on Sunday, according to Reuters.
The inauguration ceremony for the man Mr Karzai has appointed as his new governor, Mohammed Khair Khuwa, was punctuated by the sound of gunfire outside, the BBC's Andrew North reports.
US helicopters patrolled the skies overhead, our correspondent says.
Mr Khan declined a low-profile ministerial post offered by the president after his dismissal on Saturday.
News of his sacking brought protesters into the streets, with
demonstrators gathering in the city centre during the afternoon to chant "Death to Karzai, death to Americans". Afghan soldiers are said to have fired warning shots.
Eyewitnesses said framed pictures of President Karzai were smashed in the street.
In a separate clash, protesters pelted a US military vehicle with stones and troops also fired warning shots.
Ismail Khan's replacement is being seen as an attempt by Mr Karzai to strengthen his position ahead of the historic October elections.
Hundreds of Afghan government troops were flown to Herat in US aircraft to bolster security ahead of the announcement.
One of the best-known former mujahideen leaders, Mr Khan led an uprising there against Soviet troops in 1979.
After taking over as governor in 2001, he turned it into a kind of personal fiefdom, our correspondent says.
For the past few weeks, rumours had been growing that Mr Karzai was preparing to replace Mr Khan after his forces clashed with the fighters of another local militia commander, Amanullah.
Although Amanullah was placed under house arrest, Mr Khan was widely seen to have been weakened by the fighting in which he lost control of several areas of the province, our correspondent says.
The US welcomed Mr Karzai's decision to sack him, but also warned anyone involved against taking action which might threaten security in the region.