KABUL – The United Nations is sending about 600 foreign staff out of the country or into secure compounds because of the deadly Taliban attack on U.N. workers, warning the Afghan government Thursday that international support will wane unless it cracks down on corruption fueling the insurgency.

The decision follows a drawdown of U.N. operations in Pakistan, casting doubt on whether the world body can operate effectively in this region with war raging on both sides of the border. The moves come as the Obama administration nears a decision on whether to send tens of thousands more U.S. troops to Afghanistan to try to curb the growth of the Taliban.

The U.N. insists the staff relocations — which affect more than half the organization's foreign staff in Afghanistan and a modest number in Pakistan — are temporary.

Norwegian diplomat Kai Eide, the top U.N. official in Afghanistan, told reporters that "we are not talking about evacuation" — language similar to that used by U.N. spokesmen in 2003 when the world body announced a "temporary relocation" from Iraq after bombings against U.N. facilities. The drawdown lasted for years.

Nevertheless, insurgents can claim a psychological victory. Hampering the international community's ability to carry out aid and development work makes it much harder to win the hearts and minds of the people, a key ingredient for success on the battlefield.

Reviving local economies and improving the effectiveness of local administrations are integral parts of U.S. counterinsurgency strategy.

Earlier this week, the U.N. announced it was pulling some expatriate staff from Pakistan after a deadly attack in the capital, Islamabad. It also suspended long-term development work in such fields as health, education, agriculture and the environment in key areas of the lawless border area with Afghanistan.

The Phase IV threat level the U.N. assigned to Pakistan's semiautonomous tribal region and North West Frontier Province is only one level below full evacuation. The U.N. said the distribution of food would continue through non-governmental organizations.

In Afghanistan, the U.N. mission is still reeling from the pre-dawn assault Oct. 28 on a guest house in Kabul where dozens of U.N. staffers lived. Gunmen wearing suicide vests stormed inside, killing five U.N. workers and three Afghans. The three assailants also died.

The Taliban said they attacked the guest house because the U.N. was working on the Afghan election, which they viewed as a Western plot.

"It's been a few very difficult, dramatic days for us as U.N. family," said Eide, who visited the charred remains of the house where a blue U.N. flak jacket lay covered in ashes. "We have to get over it. We will, of course, continue our work here as we have promised."

About 600 of the 1,100 international staff will be moved for three to four weeks to more secure locations both within and outside of Afghanistan while the world body works to find safer permanent housing, U.N. spokesman Aleem Siddique said.

Only a minority of those 600 will be temporarily relocated outside Afghanistan, U.N. spokeswoman Michele Montas said in New York.

Eide said a number of options were being considered for those who leave Afghanistan, including Dubai — a frequent destination for U.N. staff on rest breaks.

Although Eide insisted the U.N. was not abandoning Afghanistan, he made clear that the U.N. is concerned about the deteriorating situation in the country and the failure of President Hamid Karzai's government to stamp out corruption.

"There is a belief among some that the international commitment to Afghanistan will continue whatever happens because of the strategic importance of Afghanistan," Eide told reporters. "I would like to emphasize that that is not correct. It is the public opinion in donor countries and in troop-contributing countries that decides on the strength of that commitment."

In Britain, public calls for a pullout of troops have intensified since an Afghan policeman shot and killed five British soldiers Tuesday. Britain is the largest contributor to NATO forces in Afghanistan after the United States, and its continued presence here is vital to Obama's strategy.

Security in Pakistan is another key part of U.S. strategy in the region, partly because Taliban militants and their al-Qaida allies use the Pakistani side of the porous border as a base from which to plan attacks in both countries.

A surge of violence across Pakistan over the past month has killed more than 300 people, including 11 U.N. workers, and threatened to destabilize the nuclear-armed nation. In one particularly jarring attack, a suicide bomber struck the World Food Program's headquarters in the heart of the capital.

The rise in attacks is believed to be partly a retaliation for an ongoing Pakistani ground offensive launched last month against the Taliban in South Waziristan, part of the tribal area.

"We have revved up security all over the world, but the risks are increasing because right now the United Nations is increasingly a target," Montas said.

About 80 percent of the U.N. staff in Afghanistan are Afghans and will continue to work as usual, U.N. officials said.

The relocation order was the latest blow to the troubled U.N. mission, which had been overseeing the fraud-marred Afghan presidential election, which ended this week when the lone remaining challenger to Karzai dropped out and a runoff planned for Saturday was called off. The challenger, Abdullah Abdullah, said he could not be assured that the vote would be fair.

The top-ranking American in the U.N. mission here, Peter Galbraith, was fired in September after claiming Eide was not bullish enough in preventing fraud in the first-round presidential vote the month before.

Nevertheless, Eide lectured Karzai on Thursday on corruption and fraud.

"We can't afford any longer a situation where warlords and power brokers play their own games," Eide said. "We have to have a political landscape here that draws the country in the same direction, which is in the direction of significant reform."

Defending Karzai, presidential spokesman Humayun Hamidzada called the Afghan leader a "unifying figure" who has brought together Afghans from all walks of life. He said the government and the international community must cooperate "to fight corruption in all its forms whether it's in the Afghan bureaucracy or in the award of international contracts."