Republican presidential nominee John McCain this morning categorised the time frame for US troops withdrawal from Iraq as "not too important" and suggested he is prepared for a long-term commitment there.

"We are succeeding" in Iraq, he said. "And it's fascinating that Senator Obama doesn't realise that."

The remarks provided an immediate opportunity for presumptive Democratic nominee Barack Obama's campaign to bring the war back to the forefront of the race. He has been a steadfast opponent of the war since 2002.

His campaign responded immediately and forcefully this morning, lining up a team of surrogates who said McCain's statements show he doesn't understand the nature of the conflict there and is out of touch with the desire of the American people to see an end to the deployment.

"This is yet one further indication of his really striking lack of appreciation of the burden that Iraq is placing on our military, and the fact that we are facing a fundamental problem of strategic overstretch," Obama foreign policy adviser Susan Rice said during a conference call with reporters.

Former Navy secretary Richard Danzig said McCain's remarks contribute to the "jihadi narrative" about US ambitions in the region.

"It's very unfortunate that when we are being accused of planning to have permanent bases and to occupy Arab lands … to have an aspirant for the presidency of the United States to say it wouldn't be at all important if we stayed there indefinitely," Danzig said.

Massachusetts senator John Kerry, like McCain a Navy veteran of Vietnam, said the remarks betray "an enormous fundamental flaw in his candidacy for presidency, which supposedly has hung on his strength on foreign policy".

House speaker Nancy Pelosi, a Democrat, said McCain's remarks, are "yet another indication how out of touch he is with the effect the war in Iraq is having on the readiness of our military".

Obama supporters also pointed to what they say are McCain's shifting proposals on Iraq.

In January, McCain said US forces could be in Iraq as long as 100 years, but recently retreated, predicting most combat troops would be out of the country by 2013 if he is elected.

Also this morning, the Arizona senator also called on the nation's gas and oil companies to increase investment in alternative energy, saying it would lessen the US dependence on foreign oil and curb greenhouse gas emissions.

"The oil companies have got to be more participatory in alternate energy, in sharing their profits in a variety of ways," he said on NBC's Today Show.

With average US gasoline prices topping $4 a gallon and crude oil breaching $120 a barrel, McCain and Obama have begun a robust debate over energy policy. Both say they are committed to developing alternative energy sources. McCain promotes nuclear energy, and maintains the free market will encourage innovation in other clean energy sources. He also favours giving consumers a break on the federal gasoline tax this summer, a proposal that Obama rejects and that economists of all stripes say would be ineffective in reducing prices at the pump.

Obama proposes mandating better fuel efficiency from automobile manufacturers, and investing $150bn over ten years in clean energy research. He has also called for a windfall profits tax on oil companies, which the McCain camp derides as a return to failed Carter-era energy policy that will harm consumers.

McCain is also seeking to win over environmentally conscious independent voters in calling for increase alternative energy production. Polls have shown high energy costs are a top issue for voters this year.

"If we're truly going to reduce greenhouse gas emissions in this country, we have to go to alternate energy," he said. "And the technology is there, and the innovation is there, and we can unleash it."

McCain predicted that the price of gasoline would not drop "much lower" before the November election "and could go higher".

Meanwhile, a newly released poll shows Obama has gained support among woman voters since Clinton withdrew from the race.

His lead over John McCain among women rose to 13 percentage points from five points since the end of May, according to a new Gallup poll.