Under pressure from some Democrats to change the subject from national security - regarded by many as President George Bush's strongest issue - Kerry tried to focus exclusively on the economy and other domestic topics at a neighbourhood meeting on Monday, but supporters raised the Iraq subject.
Although he declined to set a precise timetable for pulling out US troops, the presidential hopeful said it would be possible if certain conditions were met, such as bringing in allies to help with security.
The Massachusetts senator, who has said he would have voted to give Bush the authority to use force if necessary against Iraq even if he had known at the time that Saddam Hussein had no weapons of mass destruction, has struggled to draw clear contrasts with the president.
"I would not have done just one thing differently than the
president on Iraq, I would have done everything differently
than the president on Iraq," he said.
"I said this from the beginning of the debate to the walk up to the war. I said: 'Mr President don't rush to war, take the time to build a legitimate coalition and have a plan to win the peace'."
"We want those troops home and my goal would be to try to get them home in my first term"
Democratic presidential nominee
Kerry said Bush had failed on all three counts. He called the president's talk about a coalition fighting alongside about
125,000 US troops "the phoniest thing I've ever heard".
"You've about 500 troops here, 500 troops there and it's
American troops that are 90% of the combat casualties
and it's American taxpayers that are paying 90% of the
cost of the war," he said.
"It's the wrong war, in the wrong place at the wrong time," he added.
No long-term designs
Kerry, like Bush, promised that the US would stay the course in Iraq until the country was secure, saying: "We have to do what we need to do to get out and do it right."
He also said Washington should make it clear to the world that the US had no "long-term designs to maintain bases and troops in Iraq".
"We want those troops home and my goal would be to try to get them home in my first term and I believe that can be done," he said.
If Kerry were to beat Bush in the 2 November election, his first four-year term would end in January 2009.