WASHINGTON - The White House on Wednesday condemned militant attacks in Afghanistan and Pakistan and expressed condolences to the victims.

White House spokesman Robert Gibbs said an attack at a U.N. guest house in Kabul was an attempt to disrupt Afghanistan's November 7 presidential run-off election and will not succeed.

A bombing at a marketplace in Pakistan, he said, showed the extent to which extremists will go and the type of threat they pose for both Pakistan and the United States.

(Reporting by Steve Holland; Editing by Matt Spetalnick)