"The first day I would get us out of Iraq by diplomacy," said New Mexico Gov. Bill Richardson, one of eight rivals on the debate stage Thursday night.
"If this president does not get us out of Iraq, when I am president, I will," pledged Sen. Hillary Rodham Clinton of New York.
But Clinton found herself on the receiving end of criticism moments later when former North Carolina Sen. John Edwards said she or anyone else who voted to authorize the war should "search their conscience."
Edwards, in the Senate at the time, also cast his vote for the invasion, but he has since apologized for it.
Of the eight foes participating in the debate at South Carolina State University, four voted earlier in the day to support legislation that cleared Congress and requires the beginning of a troop withdrawal by Oct. 1. The legislation sets a goal of a complete withdrawal by April 1, 2008.
"We are one signature away from ending this war," said Sen. Barack Obama of Illinois. He said if Mr. Bush won't change his mind about vetoing the bill, Democrats need to work on rounding up enough Republican votes to override him.
In addition to Obama and Clinton, Sens. Joe Biden of Delaware and Chris Dodd of Connecticut also cast votes earlier in the day in favor of the legislation.
Former Alaska Sen. Mike Gravel and Rep. Dennis Kucinich of Ohio also participated in the debate.
Mr. Bush is barred by the Constitution from running for re-election next fall, and the result is an extraordinarily early start to the campaign to succeed him.
The state in which the debate was held — South Carolina — has only been carried by one Democrat since 1960. African-Americans make up 29.9 percent of the state's population, reports CBS News senior political correspondent Jeff Greenfield.
In '04, nearly half the Democratic vote was black, Greenfield reports, which is why Democrats put this primary close to the starting line.
The debate — nine months before the kickoff Iowa caucuses — was 90 minutes long without opening or closing statements from the candidates. Instead, each of the eight fielded questions in turn.
That made for a rapid-fire debate but prevented follow-up questions when any of the eight sidestepped — as when Clinton and Biden avoided answering when asked whether they agreed with Senate Majority Leader Harry Reid's assessment that the Iraq war is lost.
While Iraq dominated the debate's early moments, Edwards was asked about having paid for a $400 (euro294) haircut from campaign donations rather than from his own wallet.
"That was a mistake, which we remedied," he said. A wealthy former trial lawyer, he recalled once having gone to dinner at a restaurant as a young child and having to leave because his father could not afford the prices.
"I've not forgotten where I came from," he said.
Five of the eight — Gravel, Biden, Dodd, Kucinich and Richardson — raised their hands when moderator Brian Williams of NBC News asked whether they had ever had a gun in their home.