Ban Ki-moon, the UN secretary general, said that the the UN would not give in to such "despicable and brutal" violence
"No one underestimates the difficulties, especially in the aftermath of today's attack," he told a news conference in New York.
"In principle we are not and we should not be deterred by this heinous terrorist attack. We will continue our work, particularly on helping the Afghan government and people carry on this second presidential election," he said.Mortar attack
As the stand-off at the guest house came to an end, a mortar attack was launched on a five star hotel, The Serena, also in the capital.
Witnesses reported seeing smoke coming from the top of the building, but the attack did not cause any casualties.
The hotel, close to the presidential palace and used by diplomats and journalists, was the scene of a Taliban attack in 2008 which killed six people.
Wednesday's attack on the UN took place in a high security zone close to several heavily guarded government buildings.
Jonah Hull, Al Jazeera's correspondent in Kabul, reported: "Perhaps another line of inquiry worth mentioning is that two individuals were killed who were not residents of that guesthouse.
"The first was a security guard at the next-door house, which belonged to the father-in-law of Hamid Karzai himself, the president.
"And behind the guest house, in a house to the rear, another man was killed.
"Al Jazeera has learned that he is the brother-in-law of Gul Agha Sherzai, who is the governor of Jalalabad province, and the former governor of Kandahar, a very powerful broker and influential man in the south of this country particularly in the Pashtun vote and a supporter of Karzai."
Gunfire and explosions
Gunfire and explosions were heard shortly before dawn and a large column of smoke was seen rising over the city as armed police vehicles and fire engines raced to the scene.
A police source told Al Jazeera that the three Taliban fighters who staged the attack on the UN were wearing suicide vests and armed with AK-47 rifles and rocket-propelled grenades.
|Kabul has been on high alert in the lead up to the November 7 election runoff
The area around the guest house was sealed off by police and the Afghan army as well as US military personnel.
Initial reports had said the attack was aimed at a US military facility.
Kabul has been on high alert as preparations continue for the presidential runoff.
Last week, the Taliban issued a statement calling for a boycott of the election saying they would step up attacks on foreign forces.
The statement warned that anybody involved in running the election would be considered a legitimate target.
Following the attacks, the White House said that the Taliban would not be allowed to disrupt the polls.
"In Kabul obviously there is an attempt by some to disrupt the will of the Afghan people in choosing their next government that this administration believes will not succeed," Robert Gibbs, the White House spokesman, said.
Wednesday's attack came a day after roadside bomb attacks, claimed by the Taliban, killed eight more US troops, driving the US death toll to a record level for the third time in four months.
The escalating death toll adds to pressure on Barack Obama, the US president, as he nears a decision on a revised military strategy for the eight-year-long war in Afghanistan.