US President George W Bush has accepted responsibility for going to war in Iraq on the basis of faulty intelligence, but said it was still the right choice.
Mr Bush is under increasing pressure on the Iraq issue
On the eve of Iraq's parliamentary election, he made a robust defence of the war that toppled Saddam Hussein.
He said: "Saddam was a threat, and the American people and the world is better off because he is no longer in power."
It is the last of four keynote speeches on Iraq from a president under increasing pressure on the issue.
Polls suggest most Americans are unhappy with Mr Bush's handling of the war, and some lawmakers are questioning how long the troops should stay.
"Many intelligence agencies judged that Saddam Hussein had weapons of mass destruction, and it's true that much of the intelligence turned out to be wrong," said Mr Bush in the speech at the Woodrow Wilson Center in Washington.
But he added that Saddam Hussein was nonetheless a threat, and had been looking for the opportunity to restart his weapons programmes.
"As president, I am responsible for the decision to go into Iraq. And I'm also responsible for fixing what went wrong by reforming our intelligence capabilities. And we're doing just that," Mr Bush said.
The president insisted that US troops would stay in Iraq until the country's forces were sufficiently well trained to fully take over security duties.
A stable Iraq was in the interests of both the Iraqi and American people, he said.
And he accused critics in Washington, many of whom had originally supported the decision to invade, of playing "pure politics".
He said: "Victory will be achieved by meeting certain objectives: when the terrorists and Saddamists can no longer threaten Iraq's democracy, when the Iraqi security forces can protect their own people, and when Iraq is not a safe haven for terrorists to plot attacks against our country.
"These objectives, not timetables set by politicians in Washington, will drive our force levels in Iraq."
He concluded by saying that Iraq was becoming "a strong democracy" that would "inspire reformers from Damascus to Tehran".
Mr Bush's address follows earlier speeches on the Iraqi poll and the military and economic situation in the country.
A USA Today/CNN/Gallup poll released on Wednesday suggests 59% of Americans disapprove of Mr Bush's handling of the Iraq war.
Ahead of the speech, in the Senate, 40 Democrats and one independent signed a letter to the president in which they urge him to be more frank with the Iraqi and American public.
The administration, the letter says, should "tell the leaders of all groups and political parties in Iraq that they need to make the compromises necessary to achieve the broad-based and sustainable political settlement that is essential for defeating the insurgency in Iraq within the schedule they set for themselves".
It adds that Mr Bush must set out "a plan that identifies the remaining political, economic, and military benchmarks that must be met and a reasonable schedule to achieve them".