The United Nations evacuated 38 foreign employees from this western Afghan city Monday after a day of rioting by supporters of the ousted governor turned half a dozen international aid facilities into smoldering, looted ruins.

Calm returned to the streets after an all-night curfew, while hundreds of national police officers and soldiers patrolled. Schools reopened, shops were busy and horse-drawn carts moved along the tree-lined roads.

The newly appointed governor, Sayeed Mohammed Khairkhwa, spent his first day at work receiving visitors in a hilltop mansion overlooking Herat, guarded by dozens of U.S. and Afghan troops. His predecessor, Ismail Khan, remained secluded at home in the city below.

Khan, 57, who has dominated political life in western Afghanistan for more than two decades, repeatedly signaled his acquiescence to President Hamid Karzai's decision to replace him after weeks of clashes between rival militias left the region tense and Khan weakened politically.

"Ismail Khan has accepted Karzai's decree and considers it his duty. He is happy with the new governor being here," said Nasir Alawi, a top aide to Khan. He said Khan planned to remain in Herat and serve as a security adviser to the new provincial government, although Karzai has asked him to accept a cabinet post in Kabul, the capital.

Afghan and U.N. officials said it was clear that the mobs that destroyed three U.N. compounds and badly damaged four other agencies on Sunday had deliberately targeted foreign facilities to draw attention to their anger about Khan's removal. At least three people died and more than 50 were injured in clashes between protesters and troops.

While most foreign U.N. workers were flown to Kabul Monday, after spending the night in the local airport, officials said they would return as soon as possible and that a small staff would remain here, including those helping to prepare Afghanistan's first presidential elections on Oct. 9.

"We are not abandoning Herat, I assure you," Filippo Grandi, a deputy U.N. special representative in Afghanistan, told journalists in Kabul after briefly visiting Herat to inspect the damage to U.N. facilities. But he called the attacks "quite shocking" and said the compound of the U.N. political mission was "in ashes."

Supporters of Khan, while refraining from violence Monday, expressed deep anger at Karzai and his Western backers. Dozens gathered outside Khan's home all day, hoping for a glimpse of the leader they revere as an emir and a former anti-Soviet resistance fighter.

"He is like our grandfather, and we will support him forever," said Abdul Basir, 24, who described himself as "a simple mujahid," or freedom fighter. "We will never let foreign forces take him from us." Basir said Khan's ouster was the work of U.S. officials, who he said "only want their loyalists in power."

As he spoke, a woman hidden behind a blue veil rushed up, ranting against Karzai and praising Khan for having helped widows, students and poor people. "We want our emir, and no one else," said the woman, a teacher named Sarah. "I was the first one at the protests yesterday. I would rather vote for a dog than Karzai."

Khairkhwa, in a lengthy interview in Khan's former hilltop guest manor, outlined his plans to improve security with cooperation from various regional leaders and forces. He blamed Khan indirectly for fomenting recent bloodshed among ethnic militias and for allowing violent demonstrators to take to the streets Sunday.

"An atmosphere was created. People don't act by themselves," said Khairkhwa, 51, a former diplomat who wore a business suit and tie. He said he planned to "open a new page" by promoting human rights and civil liberties, but he added that "the democracy we want here should not be contrary to the traditional values of our society."

Khan, who always dressed in flowing robes and ruled Herat virtually as a religious fiefdom, has been accused by human rights groups of ruthlessly suppressing dissent and restricting women's rights. One of the offices burned and looted was the Herat branch of the Afghanistan Independent Human Rights Commission.

As many citizens remained angry about Khan's replacement, his troops remained calm at several posts around the city and said they had no problem cooperating with the national police and army troops who have been sent from Kabul in recent weeks. Some of Khan's men were disarmed by the army.

But the militiamen said many people were furious at the central government and its forces because of their behavior after several days of factional fighting last month in Shindand, 80 miles south of here. They said many bodies of local fighters had been left to rot, some without heads, and that the national troops, called in to stop the fighting, refused to return the bodies to families for burial.

"Our people are not happy, I'm not happy, nobody's happy," said Abdul Rashid, 30, a longtime militia fighter who was guarding the street where Khan lives. "We don't mind the American troops being here, but people are angry at the Afghan army. There are still 14 bodies of our dead in Shindand, and they won't help us bring them back."

A U.N. office was destroyed in rioting by supporters of Herat's ex-governor.