Democratic presidential hopeful Barack Obama said today a "political solution" was needed for Iraq so US troops could concentrate on the war in Afghanistan.
Mr Obama, who has visited US troops, military commanders and political leaders in both Afghanistan and Iraq this week, said the situation in Afghanistan was both "perilous and urgent".
He added that al Qaida and the Taliban there were "plotting new attacks against the United States".
"We must act now to reverse a deteriorating situation," he said.
"We should not wait any longer."
The 46-year-old Illinois senator, who would be America's first black president if elected in November, was speaking in Amman, Jordan, at his first press conference on his highly-publicised trip abroad.
He said he was "extremely impressed" by the "extraordinary" dedication, devotion and skill shown by the troops.
But he added: "We have to succeed in taking the fight to the terrorists in order to protect the American people, as well as the Afghan people."
He reiterated his plan to withdraw US troops from Iraq within 16 months of taking office, but admitted that the US commander on the ground, General David Petraeus, was clear that he did not want a timetable for the withdrawal of US combat forces.
"He wants to retain as much flexibility as possible," Mr Obama said.
"What I emphasised to him was... if I were in his shoes, I'd probably feel the same way.
"But my job as a candidate for president and a potential commander in chief extends beyond Iraq."
He said he needed to take into account the security needs in Afghanistan, the views of the Iraqi government and the potential domestic uses for the money now being spent in Iraq.
Mr Obama added that Iraq's leaders wanted "to take more responsibility for their country" and said: "There is security progress, now we need a political solution."
Mr Obama stepped off his military aircraft in Jordan carrying body armour with orange earplugs sticking out of his ears.
He is set to have talks with Jordan's King Abdullah later today, before moving on to Israel and then Europe.
Meanwhile in the US, his Republican rival John McCain, who is struggling to attract as much attention as Mr Obama, said the Democratic senator has been "completely wrong" to press for withdrawal timetables.
"When you win wars, troops come home," the 71-year-old Arizona senator and former Vietnam prisoner of war said during a visit in Maine with former President George HW Bush.