Afghanistan's election commission proclaimed President Hamid Karzai the victor of the country's tumultuous ballot today, cancelling a planned runoff and ending a political crisis that began with a fraud-marred first round two and a half months ago.

Download the new Independent Premium app Sharing the full story, not just the headlines

The Obama administration — which has been waiting for a government deemed legitimate to emerge in Kabul before announcing whether to deploy tens of thousands more troops — quickly welcomed the result.

"We congratulate President Karzai on his victory in this historic election and look forward to working with him" to support reform and improve security, the US Embassy said in a statement. Britain and the United Nations also issued statements of congratulations.

The cancellation of Saturday's vote came one day after former Foreign Minister Abdullah Abdullah announced he was pulling out less than a week before the 7 November vote. Abdullah said the ballot would not have been fair and accused the Karzai-appointed Independent Election Commission of bias.

The annulment is a huge relief to organisers who were scrambling to hold the election before the onset of Afghanistan's harsh winter, as well as authorities who feared a wave of bloody violence on polling day after a Taliban spokesman threatened attacks against anyone who took part.

Independent Election Commission chairman Azizullah Lodin announced Karzai the winner during a news conference in Kabul.

"His excellency Hamid Karzai, who has won the majority of votes in the first round and is the only candidate for the second round, is declared by the Independent Election Commission as the elected president of Afghanistan," Lodin said.

Lodin said that the commission had the authority to make the decision because the Afghan constitution only allows for a runoff between two candidates. There is a chance that the decision could be contested, but the international community appears to be lining up behind the ruling.

The US statement said the commission's decision was "according to its mandate under Afghan law."

Karzai has led Afghanistan since US forces invaded to oust the Taliban in 2001. He won elections in 2004 and his latest victory will give him another five-year mandate. The US will have to find a way to work with the Afghan leader, who has fallen out of favor in Washington after openly criticizing US military tactics, including the heavy use of air power that has killed many civilians.

The mass ballot-box stuffing that characterized the Aug. 20 vote further sullied Karzai's reputation. Fraud investigators threw out nearly a third of Karzai's votes, dropping him below the 50 percent threshold needed to win outright.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

Worried that Karzai's government would not be seen as legitimate, a bevy of international figures, including US Sen. John Kerry, US Secretary of State Hillary Clinton and British Prime Minister Gordon Brown, pressed Karzai to consent to a runoff.

But on Monday, UN Secretary-General Ban Ki-moon, who was in Kabul on a surprise visit, welcomed the decision to forego the runoff.

"This has been a difficult election process for Afghanistan, and lessons must be learned," said Ban. "Afghanistan now faces significant challenges and the new president must move swiftly to form a government that is able to command the support of both the Afghan people and the international community."

Last week, insurgents in suicide vests stormed a guest house in the heart of Kabul filled with UN election workers, killing five UN staffers and three Afghans. The attack raised questions about whether the world body might scale back its operations in the war-ravaged country.

But Ban promised Monday that the UN work would continue in Afghanistan despite the slayings. He also said Karzai had assured him Afghan security forces would work to protect his staff.

Ban told reporters that "we cannot be deterred, we must not be deterred. ... The work of the United Nations will continue."

The same day, however, the world body announced it would pull some expatriate staff out of Pakistan and suspend long-term development work in areas along the Afghan border because of violence.

The UN kept operating after an August 2003 truck bombing at its headquarters in Baghdad, which killed 22 people, including mission chief Sergio Vieira de Mello, but after a second bombing it shut down operations in Iraq in late October 2003 for years.

Meanwhile, Afghan authorities ordered all schools and universities closed for three weeks amid swine flu fears that were heightened Wednesday after the country registered its first death from the virus.

The Health Ministry said large gatherings at public baths and wedding halls will be forbidden for the same period. Many pedestrians and drivers making their way to work in the capital were wearing medical masks, which were being sold in markets and by street children.

Elsewhere, Nato-led forces said one Afghan girl was accidentally killed during an operation against militants in the southern province of Kandahar on Sunday. A joint Afghan-international force fired on two motorcycles carrying militants south of the city, killing a girl who was on one of the motorbikes, Nato said in a statement.