(CNN) -- Sen. Barack Obama said Tuesday that he was pleased with the reduction of violence in Iraq since the deployment of more U.S. troops but added that it was a result of several factors, not just the "surge."
Sen. Barack Obama and his delegation arrived Tuesday in the Jordanian capital of Amman.
"We don't know what would have happened if the plan that I preferred in January 2007 -- to put more pressure on the Iraqis to arrive at a political reconciliation, to begin a phased withdrawal -- what would have happened had we pursued that strategy," Obama said after landing in Amman, Jordan.
"I am pleased that as a consequence of great effort by our troops -- but also as a consequence of a shift in allegiances among the Sunni tribal leaders as well as the decision of the Sadr militias to stand down -- that we've seen a quelling of violence," he said.
But, Obama said, a functioning Iraq ultimately will depend on the capacity of the Iraqi people to unify themselves, get beyond sectarian divisions and set up a government that works for the people.
"There is security progress. Now we need a political solution," he said. Watch Obama describe his plan for Iraq »
Obama's stop in Jordan is the latest on his trip through the Middle East. Obama also has been through Kuwait, Afghanistan and Iraq. The senator from Illinois visited Israel before embarking on the European leg of his trip, which will take him through Germany, France and the United Kingdom. See the stops on Obama's trip »
On arriving in Israel, Obama said he was looking forward to "having discussions with the Israeli leadership about some of the profound security issues that both the U.S. and Israel are going to have to confront in the years to come."
Back in the United States, Sen. John McCain, the presumptive Republican nominee, has been criticizing Obama for his opposition to the surge, which began in 2007 when President Bush ordered nearly 30,000 additional troops to Iraq as part of a campaign to secure Baghdad and its surrounding provinces.
"He railed against it. He voted against the surge, and he said it would fail," McCain told CBS. "He was wrong there, and there's very little doubt in my mind that he will see for himself that he had a gross misjudgment and he will correct that."
The McCain campaign continued its criticism in a statement released after Obama's news conference in Jordan.
"By continuing his opposition to the surge strategy long after it has proven successful and by admitting that his plan for withdrawal places him at odds with Gen. David Petraeus, Barack Obama has made clear that his goal remains unconditional withdrawal rather than securing the victory our troops have earned and the surge has made possible," spokesman Tucker Bounds said.
Asked whether he would have supported the surge knowing what he knows now, Obama said no.
"These kinds of hypotheticals are very difficult," Obama told ABC's "Nightline" on Monday. "But I think that what I am absolutely convinced of is that, at that time, we had to change the political debate because the view of the Bush administration at that time was one that I just disagreed with."
On Tuesday, Obama reiterated his call for the withdrawal of U.S. combat troops in Iraq in 16 months upon taking office if he were elected and said he welcomes the "growing consensus in the United States and Iraq for a timeline."
Obama turned the focus from Iraq to Afghanistan, which he called a "perilous and urgent" situation.
"If we responsibly end the war in Iraq, we can strengthen our military, step up our efforts to finish the fight against al Qaeda and the Taliban in Afghanistan, and succeed in leaving Iraq to a sovereign government that can take responsibility for its own future," he said.
Obama underscored the need to redeploy combat troops from Iraq and shift resources to Afghanistan.
"That is where the 9/11 attacks were planned, and today in Afghanistan and the border region of Pakistan, al Qaeda and the Taliban are mounting a growing offensive against the security of the Afghan people and, increasingly, the Pakistani people while plotting new attacks against the United States."
Obama said he is pleased about "a growing consensus back home that we need more resources in Afghanistan."
While in Amman, Obama will meet with King Abdullah and other Jordanian officials.
Jordan, a staunch U.S. ally that relies greatly on regional stability, is sandwiched between two conflict zones: Iraq on one side and Israel and the Palestinians on the other.
The kingdom was one of the first countries to feel the impact of the war in Iraq; hundreds of thousands of Iraqis have fled to Jordan.
And Jordan, which along with Egypt has diplomatic relations with Israel, has worked to end the hostilities and promote peace between Israel and the Palestinians.
Obama has been accompanied by Sens. Charles Hagel, R-Nebraska, and Jack Reed, D-Rhode Island. Those officials spent a busy day Monday in Baghdad meeting with Iraqi officials, including Prime Minister Nuri al-Maliki. Watch whether Obama crossed a diplomatic line »
Before traveling to Jordan, the delegation left Baghdad on Tuesday and stopped in Iraq's Anbar province to meet with local officials.
CNN's Hala Gorani, Jomana Karadsheh, Mohammed Tawfeeq, Frederik Pleitgen and Alexander Mooney contributed to this report.