WASHINGTON -- President Bush pledged Wednesday to work with Democrats after the "thumping" that Republicans took on Election Day. He named a new defense secretary to oversee the war in Iraq, a change the president said was going to happen regardless of which party won the election.

Bush said former CIA Director Robert Gates, if confirmed by the Senate, would replace Donald H. Rumsfeld at the Pentagon.

Gates is a "patriot" and "strategic thinker" with a transformational spirit, Bush said from the Oval Office.

"He's a man of integrity, candor and sound judgment," the president said. "He knows that the challenge of protecting our country is larger than any political party. He has a record of working with leaders on both sides of the aisle to strengthen our national security. He has my confidence and my trust."

Bush praised Rumsfeld, in the Cabinet from the start of the Bush presidency, saying, "America is safer and the world is more secure because of the leadership and the service of Don Rumsfeld."

Bush said he had been talking with Rumsfeld about whether it was time for a fresh perspective at the department, and the two agreed Tuesday it was appropriate for Rumsfeld to resign.

"It's been quite a time," Rumsfeld said. Then, quoting Winston Churchill, he said: "I have benefited greatly from criticism, and at no time have I suffered a lack thereof."

The announcement came the day after Democrats captured control of the House after 12 years of GOP rule and erased the Republican majority in the Senate. One Senate race remained to be decided _ in Virginia, where Democrat James Webb held a slight lead of Republican Sen. George Allen. If Democrats win that seat, they would hold a 51-49 edge in the Senate; an Allen victory would split the Senate 50-50, with Vice President Dick Cheney, as president of the Senate, in position with a tie-breaking vote.

Bush called Democratic leaders to congratulate them and he expressed both disappointment and surprise over the vote.

"I thought we were going to do fine yesterday, shows what I know," Bush said at a news conference hours before introducing Gates as his nominee. "But I thought we were going to be fine in the election. My point to you is that, win or lose, Bob Gates was going to become the nominee."

Bush seemed stoic about the election, proclaiming: "This isn't my first rodeo."

"I recognize that many Americans voted last night to register their displeasure with the lack of progress being made" in Iraq, the president said. "Yet I also believe most Americans _ and leaders here in Washington from both political parties _ understand we cannot accept defeat."