AMMAN, Jordan — Democratic presidential candidate Barack Obama said Tuesday that security in Iraq has improved and that the United States urgently needs to turn its attention to Afghanistan.

"There is security progress, but now we need a political solution" in Iraq, Obama said in the first news conference of his highly publicized trip abroad. Afghanistan is now the "central front in the war against terrorism," he added.

"The situation in Afghanistan is perilous and urgent," he said. "We must act now to reverse a deteriorating situation."

He reiterated his goal of withdrawing combat troops from Iraq within 16 months of becoming president. But he said he would consult with military commanders to determine how many troops to keep in the country to protect diplomatic and humanitarian operations, to train Iraqis and to conduct counterterrorism operations against al-Qaida in Iraq.

"My goal is to no longer have U.S. troops engaged in combat operations in Iraq," he said.

Obama and his two traveling Senate companions, Democrat Jack Reed of Rhode Island and Republican Chuck Hagel of Nebraska, all emphasized at the news conference the need to turn U.S. attention to Afghanistan and to help Pakistan confront a growing terrorist presence within its borders.

Obama arrived in Jordan after a tour of war zones in Afghanistan and Iraq. He stepped off his military aircraft carrying body armor, orange earplugs sticking out of his ears.

His joint news conference with Reed and Hagel was at the Amman Citadel, an ancient hilltop ruin that bears evidence of settlements dating to 2000 B.C. The skyline of modern-day Amman, cement dwellings and the occasional mosque, formed a made-for-television backdrop.

Later, he was scheduled to have talks with Jordan's King Abdullah.

Before he left Iraq, Obama traveled to a former hotbed of the Sunni insurgency for talks Tuesday with tribal leaders who joined the fight against al-Qaida in Iraq and now seek a deeper role in Iraq's political future.

Obama met leaders of the so-called Awakening Council movement in Ramadi, one of the main cities of the western Anbar Province where al-Qaida once had the upper hand against embattled U.S. and Iraqi troops.

Tribal sheiks last year began an uprising against insurgents that is credited with uprooting extremist strongholds and helping bring violence around Iraq to its lowest levels in four years.

The meetings came near the end of Obama's two-day stop in Iraq, where he held discussions with Iraqi leaders on possible troops withdrawal initiatives and was briefed by top U.S. military commanders.

Obama sat in an ornate gold-colored chair next to the Anbar governor, Maamoun Sami Rashid al-Alwani. He also met with Sheik Ahmed Abu Risha, the older brother of Abdul-Sattar Abu Risha, a leader of a Sunni revolt against al-Qaida in Iraq who was killed in Ramadi in September 2007. An Iraqi flag was draped behind them.

A spokesman for the Anbar province, Jamal al-Mashhadani, said Obama's talks included further efforts to battle al-Qaida in Iraq and Awakening Council demands for a greater voice in Iraqi affairs.

Anbar was the birthplace of the Sunni insurgency and scene to some of the intense urban battles of the war that Obama has long opposed. U.S. forces sustained some its heaviest casualties in an offensive in November 2004 to regain footholds in the city of Fallujah.

Iraq was the third leg of a tour that's included Kuwait and Afghanistan. From Jordan, his trip moves on to Israel and Europe.

But he leaves Iraq with a possible political boost: Iraqi backing for his hope of withdraw U.S. combat troops by 2010.

Iraqi leaders on Monday stopped short of giving specific timetables or endorsing Obama's proposal to withdraw combat troops within 16 months if he wins the presidency. But their comments fit roughly into Obama's campaign pledge.

Obama's Republican rival, Sen. John McCain, said Obama has been "completely wrong" to press for withdrawal timetables. "When you win wars, troops come home," McCain said during a visit in Maine with former President George H.W. Bush.

The Iraqi government, however, appears increasingly confident to press for timeframes as violence drops and Iraqi security forces expand their roles alongside the 147,000 U.S. soldiers in the country.

"We are hoping that in 2010 that combat troops will withdraw from Iraq," the government spokesman, Ali al-Dabbagh, said Monday after Obama met with Prime Minister Nouri al-Maliki.

Obama released a statement late Monday noting that Iraqis want an "aspirational timeline, with a clear date," for the departure of U.S. combat forces.

"They do not want an open-ended presence of U.S. combat forces. The prime minister said that now is an appropriate time to start to plan for the reorganization of our troops in Iraq — including their numbers and missions. He stated his hope that U.S. combat forces could be out of Iraq in 2010," Obama said in a joint statement with Hagel and Reed.

The senators said that while there has been some "forward movement" on political progress, reconciliation and economic development, there has not been "nearly enough to bring lasting stability to Iraq."

Associated Press Writer Brian Murphy contributed to this report from Iraq.