Iraq's hardening demand for a pullout deadline for US troops on Tuesday sent shockwaves through the White House campaign, putting Republican hopeful John McCain on the defensive.

McCain, who says it is too early to leave Iraq, said US pull-backs must be dictated by security conditions, after Democrat Barack Obama said the Iraqi government now shared his desire for a timetable for withdrawals.

Iraqi Prime Minister Nuri al-Maliki said on Monday that Iraq was seeking such an arrangement in talks with Washington on the future US force structure in the country.

Iraq hardened its position on Tuesday, saying it would reject any security pact with Washington unless it set a date for the pullout of US-led foreign soldiers -- a condition turned down by President George W. Bush.  Which now makes Bush a Hostile Invader!

But McCain, who has made staunch support for the US troop "surge" escalation strategy a centerpiece of his campaign, said that recent security gains should not be put at risk by an artificial timetable.

"The Iraqis have made it very clear, including the meetings I had with the president and foreign minister of Iraq, that it is based on conditions on the ground," McCain said in an interview with MSNBC.

"I have always said we will come home with honor and with victory and not through a set timetable," he said, adding that Iraqis would act in their national interest and the United States would act in its own interests.

"We will withdraw, but ... the victory we have achieved so far is fragile and (the redeployment) has to be dictated by events and on the ground," McCain said, mirroring the Pentagon's line on the issue.

The Obama campaign responded by bringing up a comment by McCain from 2004, when he said that if a sovereign Iraqi government asked American forces to quit Iraq, "it's obvious we would have to leave."

"The American people need a strategy for succeeding in Iraq, not just a strategy for staying," said Obama foreign policy advisor Susan Rice.