President George W Bush has said he is confident that democracy will prevail in Iraq and that continuing violence will not derail next month's elections.
The US defence secretary may face questions over facilities in Iraq
He was speaking after 18 Americans and four Iraqi soldiers were killed in the deadliest single attack against the US since the start of the war in Iraq.
Those who died had been on "a vital mission for peace", Mr Bush said.
An explosion ripped through the dining hall of a US military base in Mosul, north Iraq, as troops sat down to eat.
The US military reported a single blast at Camp Merez, south-west of the city, on Tuesday which militants claimed as a suicide attack.
Fourteen of the US dead were military personnel and four were civilian contractors, according to the latest casualty figures cited by the US military. Another 72 people were wounded.
The BBC's Matt Frei, in Washington, says it was the "bloodiest and most brazen" attack on the US in Iraq to date.
He says Mr Bush appears to have lost his customary optimism in the face of so many deaths at one time.
'Not worth fighting'
Speaking at the Walter Reed Army Medical Center in Washington DC, Mr Bush said the violence should not affect elections scheduled for 30 January.
"I'm confident democracy will prevail in Iraq," he said.
He offered condolences to the victims' families and stressed that the US was carrying out a vital mission for peace.
Bush says Iraqi forces are not yet ready to keep order
But our correspondent adds that Mr Bush will be aware the violence does not bode well for Iraq's elections - and could dent his support at home.
The attack follows closely behind an ABC News/Washington Post poll that suggests a majority of Americans now believe the war in Iraq was not worth fighting.
Even before the Mosul deaths, the poll indicated that seven out of 10 US citizens thought the level of American casualties in Iraq was unacceptable.
Mr Bush on Monday acknowledged that repeated car bomb attacks by insurgents in Iraq were "having an effect" on the situation.
OPINION POLL IN THE US
56% say the cost of the Iraq conflict outweighed its benefits
A slight majority believe the war has contributed to the long-term security of the US
70% say these gains have come at an "unacceptable" cost in military casualties
Source: ABC News/Washington Post (20 Dec 2004)
He admitted the bombings were an "effective propaganda tool" and warned that Iraqi security forces were still not ready to keep order.
The Mosul incident follows Sunday's twin attacks on Karbala and Najaf that claimed more than 60 lives, amid mounting violence in the run-up to the poll.
The BBC's Michael Buchanan, in Washington, says Defence Secretary Donald Rumsfeld may face more criticism over the way US forces are equipped in Iraq.
An investigation will now take place to determine whether the attack or the scale of the casualties could have been prevented.
The dining hall, a large tent which was shielded by towering concrete walls but had no protected roof, should have been replaced by a fortified building in time for Christmas.
The BBC's James Reynolds, who was embedded with US troops at the base last month, says the dining hall has always been seen as vulnerable.
A statement attributed to the Ansar al-Sunna militant group on an Islamist website said one of its suicide bombers had carried out the attack.
Before Tuesday's attack, the worst single incident for the US military in Iraq was a helicopter crash in Mosul in November 2003, which killed 17 soldiers.
Mosul, Iraq's third biggest city, has experienced a wave of violence since the middle of November and much of the city centre is off limits to Iraqi security forces and US troops.