McCain, who has linked his political future to U.S. success in Iraq, was in the wartorn country on Monday for meetings with Iraqi and U.S. diplomatic and military officials.
"We were very encouraged by the success of the surge and the reduction in U.S. casualties," McCain told reporters in Jordan, where he stopped on the next leg of a congressional visit that will also take him to Israel, Britain and France.
It was the senator's eighth visit to Iraq, and his first since emerging as the presumed Republican candidate. He is accompanied by Connecticut Sen. Joe Lieberman, an independent, and Sen. Lindsey Graham, R-S.C., two of his top supporters in the race for president.
"We are succeeding, but we still have a long way to go," McCain said, pointing at what he described as al Qaeda's residual power in Iraq and at Iran's growing influence, as the major remaining threats.
He promised that, if elected president, he would uphold a long-term military commitment in Iraq as long as al Qaeda in Iraq is not defeated.
McCain, who is the top Republican on the U.S. Senate Armed Services Committee, said the trip to the Middle East and Europe was for fact-finding purposes, not a campaign photo opportunity.
He is expected to meet with British Prime Minister Gordon Brown for the first time, and French President Nicolas Sarkozy for the third time. He met and corresponded with Sarkozy both before and after the French president was elected. They last saw each other last summer.
McCain has told reporters he worries that insurgents might try to influence the November presidential election by stepping up their attacks in Iraq.
McCain is a supporter of the 2003 invasion and President Bush's troop increase last year.