New US Defence Secretary Robert Gates has warned that failure in Iraq would be a "calamity" that would haunt the United States for many years.
Mr Gates takes office amid a wide-ranging review of Iraq policy
Mr Gates spoke after taking his oath of office from Vice-President Dick Cheney.
Mr Gates, who replaces Donald Rumsfeld, said Iraq was his top priority. He also vowed not to let Afghanistan become "a sanctuary for extremists" again.
His comments come as a US report finds attacks on US and Iraqi troops are at their highest level since June 2004.
The Pentagon report said attacks on US and Iraqi troops and civilians increased considerably in recent months to almost 1,000 a week - the highest level since Iraq gained sovereignty two years ago.
The report said the worst violence was in Baghdad and the western province of Anbar, long the focus of activity by Sunni insurgents.
The BBC's Nick Miles in Washington says its criticism of the Iraqi government's efforts to end sectarian violence seems to chime with President George W Bush's emphasis on shifting responsibility for security to the authorities in Baghdad.
For the Bush administration, this latest evidence will add to the sense of urgency in Washington to find a fresh strategy in Iraq, our correspondent says.
The new American defence secretary said he intended to go to Iraq soon to hear the "unvarnished" views of US commanders on how to improve matters.
"Failure in Iraq at this juncture would be a calamity that would haunt our nation, impair our credibility, and endanger Americans for decades to come."
Mr Gates warned that progress made in Afghanistan, where the US military has been involved for the past five years, "is at risk".
"The United States and its Nato allies have made a commitment to the Afghan people and we intend to keep it," he said.
"Afghanistan cannot be allowed to become a sanctuary for extremists again."
Mr Rumsfeld, the chief architect of the war in Iraq, resigned last month amid heavy criticism of his policy.
Mr Gates, 63, takes office amid a wide-ranging administration review of its approach to the war.
Mr Bush said last week he would wait until January to announce his new strategy, to give his new defence chief a chance to offer advice.
Speaking after the swearing-in, Mr Bush said Mr Gates was "the right man" for the challenges of Iraq and the wider fight against terrorism.
The BBC's Adam Brookes in Washington says the challenges facing Mr Gates are immense.
Mr Gates has said the US is not winning the war in Iraq
As well as advising the president on a new strategy for the war in Iraq, he will have to wrestle with the enormous demands being put on the US military in terms of equipment and personnel, our correspondent says.
He will also have a vital political role, supporting a weakened President Bush in persuading Americans that the war in Iraq is still worth fighting, our correspondent adds.
At a confirmation hearing in the Senate earlier this month, Mr Gates said the US was not winning the war in Iraq, and that he was open to new policy ideas.
Former Secretary of State Colin Powell has gone further, saying that overstretched US troops are losing the conflict.
Mr Gates served as CIA director from 1991 until 1993, during the administration of Mr Bush's father.
Mr Bush accepted Mr Rumsfeld's resignation after November mid-term elections in which the Republicans lost control of both the House of Representatives and the Senate.
Public discontent over the conduct of the Iraq war was seen as a major factor in the defeat.