George Bush's comments, coming less than three weeks before crucial US domestic elections, follow his acknowledgement on Wednesday that the current steep spike in violence in Iraq "could be" compared to the Tet Offensive in Vietnam.
"Our goal in Iraq is clear and unchanging. Our goal is victory," said Bush, speaking at a rally on Thursday for embattled Republican congressman Don Sherwood in the town of La Plume, Pennsylvania.
"We are a nation at war, and we must do everything in our power to win that war," he said.
"We will not pull out our troops from Iraq before the terrorists are defeated. We will not pull out before Iraq can govern itself, sustain itself, and defend itself," he said.
The ongoing flare-up in violence in Iraq comes in the middle of a bitterly fought political campaign ahead of November 7 elections to decide control of the US Congress between opposition Democrats and Bush's Republicans.
Democrats are pinning their hopes of winning on the unpopular Iraq war and Bush's poor poll numbers.
Even the mention by Bush of the Vietnam War has loud political resonance. The war divided Americans at the time and remains a deeply sensitive subject four decades later.
The 1968 Tet Offensive launched by the Vietcong and the North Vietnamese against South Vietnamese and US forces was considered a military defeat but a psychological victory, in that it crystallised US public opinion against the war.
Bush raised the Vietnam parallel on Wednesday for the first time when asked in an ABC News television interview about a comparison by Thomas Friedman, a New York Times columnist, of the strife in Iraq with the Tet Offensive.
"He could be right," Bush said. "There's certainly a stepped-up level of violence, and we're heading into an election."
The Tet Offensive occurred before US presidential elections, bolstering the anti-war camp and leading the Democratic president, Lyndon Johnson, to announce he would not seek re-election.