KABUL - Afghan President Hamid Karzai must face an election run-off against his main rival on November 7, officials said on Tuesday, to resolve a disputed first round that plunged the country into months of political uncertainty.

Karzai welcomed the ruling by the government-appointed Independent Election Commission (IEC) after hours of closed-door meetings with western diplomats and mounting international pressure to accept the need for a second round.

The heavily disputed August 20 vote has fanned tension between Karzai and the West and complicated U.S. President Barack Obama's decision on whether to send thousands more U.S. troops to Afghanistan to fight a resurgent Taliban.

Obama, British Prime Minister Gordon Brown and U.N. Secretary-General Ban Ki-moon all welcomed Karzai's decision to accept the run-off, Obama describing it as an important step forward for democracy.

It is now vital that all elements of Afghan society continue to come together to advance democracy, peace and justice, Obama said in a statement.

We look forward to a second round of voting, and the completion of the process to choose the president of Afghanistan, he said.

With U.S. Senator John Kerry by his side, Karzai told reporters at a news conference in Kabul that he accepted the need for a run-off against his former foreign minister Abdullah Abdullah.

We believe that this decision of the IEC is legitimate, legal and constitutional and that it strengthens the path toward democracy, Karzai said.

Afghanistan has endured weeks of political uncertainty that analysts say has only emboldened a resurgent Taliban after eight years of war.

The IEC's ruling came after a U.N. election fraud watchdog invalidated tens of thousands of votes for Karzai. That investigation, published on Monday, pushed the vote for Karzai back below the 50 percent level needed to avoid a run-off.

The decision however presents a logistical nightmare, with Afghanistan's harsh winter approaching fast.

Abdullah's camp said they were prepared for the run-off.

We had hoped the president would accept the second round, said his spokesman Fazel Sangcharaki.

MOUNTING CASUALTIES

The uncertainty has also added to pressure on Washington and Afghanistan's other allies, Britain in particular, who have faced mounting military casualties as violence this year reached its worst levels since the Taliban were overthrown in 2001.

In an apparent show of solidarity, Karzai was also flanked by the United Nations' top representative in Kabul, Kai Eide, and the U.S. and British ambassadors.
Analysts say Karzai -- who is a Pashtun, Afghanistan's largest ethnic group -- is likely to win a run-off, but the scale of fraud alleged in the first round may cast a large shadow over the legitimacy of his rule.

Just before Karzai's announcement, a spokesman for the IEC confirmed that neither Karzai nor Abdullah had received more than 50 percent of the vote.

Provisional results had given Karzai 54.6 percent.

Kerry said the second round would allow the national leadership to run with legitimacy.

Kerry said that Abdullah had also agreed with the second-round verdict. He said there had been no discussion of a national unity government, suggested by some analysts as another way out of the impasse.

The West was ready to support the next round of the election even though it required a sacrifice, Kerry said.

A time of enormous uncertainty has been transformed into a time of great opportunity, Kerry said.

Earlier, U.S. Secretary of Defense Robert Gates said the United States cannot wait for problems surrounding the Afghan government's legitimacy to be resolved before making a decision on whether to send more troops.

(Additional reporting by Golnar Motevalli and Maria Golovnina in KABUL, Ross Colvin in WASHINGTON, and Louis Charbonneau at the UNITED NATIONS; Writing by Golnar Motevalli; Editing by Paul Tait)

(For more Reuters coverage of Afghanistan and Pakistan, see: here and a blog blogs.reuters.com/afghanistan/)