Kabul, Afghanistan (CNN) -- Non-essential U.N. staff across Afghanistan have been ordered to pack their bags and be ready for evacuation after a deadly attack on a U.N. guesthouse, a senior U.N. official said Thursday.
The staff members will leave the country because of security concerns, according to the official, who said a smaller staff will reduce exposure during the upcoming presidential runoff, but will not affect U.N. capabilities to support the election.
The United Nations also reduced non-essential staff ahead of the August 20 election, the official said.
The order comes a day after Taliban militants stormed the guesthouse in an early morning raid on Wednesday, killing five U.N. staff members and wounding nine more. At least 25 U.N. employees were staying at the guesthouse, including 17 members of the U.N. election team.
Afghanistan's presidential runoff election is scheduled for November 7. Taliban militants have threatened to disrupt the polling.
The United Nations said it was reviewing its security procedures in the aftermath of Wednesday's attack.
"This is a sad day and very difficult day for the United Nations," U.N. Secretary General Ban Ki-moon said Wednesday, condemning the "shocking and shameless act and the terrorists who committed this crime" and noting that the incident is a reminder of how tough the U.N. job is in Afghanistan.
Ban said he was assured by Kai Eide, the top U.N. official in Afghanistan, that Afghan President Hamid Karzai had instructed his Interior Ministry to strengthen security, and he said the United Nations would do likewise -- in Kabul as well as elsewhere in the country.
"We will, of course, review our security procedures, as we do regularly for the Afghanistan mission as a whole. We will take all necessary measures to protect our staff," Ban said.
In the strike, weapons fire and explosions pounded the heart of the capital starting about 6 a.m. local time. The fighting began as sporadic gunfire, but intensified over time, lasting more than an hour.
The attack took place in a relatively secure section of the capital, in the vicinity of a number of government buildings. The firefight, which included machine-gun fire and rocket-propelled grenades, appeared to be concentrated near the guesthouse.
The Taliban claimed responsibility for the attack, saying on an insurgent Web site that three militants had killed 50 foreigners, who were election organizers. The claim could not be independently confirmed.
Officials said three militants were killed.
International troop levels increased this year, to provide security for the Afghan election in August, and the United States is considering deploying more troops.