In a strategy shift, the U.S. military in Iraq is redeploying its troops to positions outside cities, leaving the main defense to Iraqi security forces.

Starting in early 2007, with Iraq on the brink of all-out civil war, the troops were pushed into the cities and villages as part of a change in strategy that included President George W. Bush's decision to send more combat forces.

The bigger U.S. presence on the streets was credited by many with allowing the Americans and their Iraqi security partners to build trust among the populace, thus undermining the extremists' tactics of intimidation, reducing levels of violence and giving new hope to resolving the country's underlying political conflicts.

Now the Americans are reversing direction, consolidating in larger bases outside the cities and leaving security in the hands of the Iraqis while remaining within reach to respond as the Iraqi forces require.

The U.S. is on track to complete its shift out of all Iraqi cities by June 2009. That is one of the milestones in a political-military campaign plan devised in 2007 by Gen. David Petraeus, when he was the top U.S. commander in Iraq, and his political partner in Baghdad, Ambassador Ryan Crocker. The goal also is in a preliminary security pact with the Iraqi government on the future U.S. military presence.

The shift is not explicitly linked to U.S. plans for increasing its military presence in Afghanistan, but there is an important connection: The logistical resources needed to house and supply a larger and more distributed U.S. force in Afghanistan have been tied up in Iraq. To some extent that will be relieved with the consolidation of U.S. forces in Iraq onto larger, outlying bases that are easier to maintain.

These moves coincide with priorities expressed by President-elect Barack Obama during his campaign: reducing the U.S. military commitment in Iraq and putting more resources into Afghanistan. It also fits with Petraeus' view that a more robust counterinsurgency approach is needed in Afghanistan, meaning not only a larger number of troops but also getting them spread out into more villages.

But it also points up a major gamble in Iraq — namely, that the Iraqis are ready to handle the insurgency themselves.

Stephen Biddle, a senior fellow for defense policy at the Council on Foreign Relations and an occasional adviser to Petraeus, is among those who worry about the consequences of excluding U.S. forces from the cities.

"It gets us out of the way" should Prime Minister Nouri al-Maliki decide to use Iraqi security forces to crush the U.S.-allied Sunni neighborhood militia groups who have been instrumental in attacking extremist elements of the insurgency, Biddle said in an e-mail exchange. Al-Maliki sees those militiamen, whom the U.S. has dubbed "Sons of Iraq," as an internal threat to Shiite political predominance.

Biddle said that on balance he believes the risks are more likely to outweigh the benefits of sticking to the June goal.

Retired Army Col. Peter Mansoor, who served as Petraeus' right-hand man in Baghdad during the U.S. troop buildup and has written a book, "Baghdad at Sunrise," about the counterinsurgency effort, also has misgivings. He said in an e-mail exchange Tuesday that his main concern is sectarian violence.

"Without U.S. forces in the cities, the Shiite and Sunni militias could once again take to fighting each other without an honest broker to keep the peace," he said. "The Iraqi army is not ready to play this role, in my view — not yet, anyway."

Ready or not, U.S. commanders are marching steadily in that direction — and not just in Baghdad.

Brig. Gen. Martin Post, deputy commander of U.S. forces in western Iraq, where the Sunni insurgency has sharply abated — if not almost disappeared — since 2007, said Monday his outfit is shutting down the U.S. base at Fallujah. The U.S. headquarters elements there are moving to al-Asad air base, a large but remote facility in the vast desert halfway between Fallujah and the Syrian border.

"There's been a big effort to move all the Marine forces out of the cities," Post said in a videoconference with reporters at the Pentagon. "And so as you go throughout, from Fallujah all the way up the Euphrates River Valley, up to al-Qaim — where we used to have Marines actually living in the cities — we've pulled them all out."