The Washington Post's Thomas Ricks predicted in his recent authoritative history, The Gamble, that Obama would keep 25,000 to 50,000 troops in Iraq as a "residual" force indefinitely. Ricks reports that generals like David Petraeus and Raymond Odierno were expecting at least that many troops, and predicts that the fighting will continue for decades.

Obama's announced new policy must shock Ricks and the military leaders he extensively interviewed. Obama's official stance comes after many months of appearing to support the notion of residual forces, which many in the peace movement correctly believed could lead to low-visibility counterinsurgency and a permanent military occupation. Obama said nothing to dissuade the critics until Friday's speech at Camp Lejeune, North Carolina.

In debates within the Obama camp, only John Podesta, transition adviser and head of the Center for American Progress (CAP) was publicly advocating that all troops, including trainers and advisers, be withdrawn within one year.

Ricks' book is wrong on another related matter, the role of the antiwar movement in this process. Ricks celebrates Petraeus for having pacified Iraq in the face of considerable Democratic doubt, and for winning the political war at home in 2007-2008. Petraeus's stated goal was to speed up the Iraqi clock (the surge) while slowing down the American one (the electoral calendar). Ricks says he pulled it off. After Petraeus's appearance before Congress in September 2007, Rick says, domestic criticism faded away. News coverage of Iraq sharply declined, as networks began to withdraw from Iraq. The March 2008 antiwar demonstrations were "tiny," he writes, with fewer than 1,000 in Washington and 500 in San Francisco.

Ricks is partly right. Democratic party leaders and big donors pulled back from the issue of Iraq after Petraeus's testimony, and after a MoveOn advertisement accusing the general of betrayal. The resulting crisis in the DC hub of antiwar advocates was never resolved, but the grassroots peace bloc in the Democratic primaries mushroomed anyway, giving Obama a needed edge in Iowa and a string of wins against Hillary Clinton.

When there was a choice between supporting Barack Obama and attending rallies organized by various Maoists, Trotskyists and neo-anarchists opposed to Obama and electoral politics, the grassroots peace movement headed for the precincts by the thousands. What appeared to Ricks to be a failed antiwar rally in Washington was only evidence that the movement was moving on, becoming a voting force in and around the Obama campaign.

That turned out to be the right strategy for the peace movement when John McCain was defeated in November, but many continued to wonder--with good reason--whether Obama was promising nothing more than partial peace under a new form of military occupation. Now it is clear that somewhere along the way Obama became persuaded that it made little sense to leave 50,000 troops in Iraq when the Pentagon couldn't win with 150,000, the American economy was collapsing and his hands were full in Afghanistan and Pakistan.

In Iraq the situation remains unpredictable. A brutal nationalist and authoritarian state, with sectarian police and thousands of detainees, looms as the result of a seven-year war. Under Odierno's command, according to Ricks, tens of thousands of military-aged Sunni males (called MAMs) were held in preventive detention. Bob Woodward's recent book goes further, crediting a top-secret US program of extrajudicial killings for imposing a peace of the dead in Baghdad. The Sunni insurgency decided in 2007 that an alliance with the Americans would thwart their Al Qaeda rivals while providing protection against the Shi'a majority. They were right, and 100,000 of the so-called Sons of Iraq were paid $20 million per month not to shoot at Americans. On the other hand, the Shi'a who already were installed in power by the Americans had no reason to fight their sponsors, especially when even the militias loyal to Moktada al-Sadr chose to take a political path to power, at least for the moment. The Iranians will be pleased to see the US troops depart on any schedule, and enjoy good relations with whichever Shi'a party prevails in Iraq. The festering Kurdish crisis could boil over, but is localized. Things could change, but most Iraqis have an interest in seeing the Americans implement the "withdrawal agreement." Who knows, they may even throw flowers to the retreating troops instead of shoes.

The greater danger from Iraq for Obama may lie at home politically if Republicans and the generals, echoed by the mainstream media, protest Obama's withdrawal plan as naïve or worse. In Ricks's analysis, Obama would not want to risk a confrontation with the military early in his presidency:

"Like Clinton, Obama would also face the prospect of a de facto alliance between the military and congressional Republicans to stop him from making any major changes. "

Since Ricks was wrong about Obama's fortitude, he may be wrong on the danger of a backlash as well. The American people are in no mood for a "forever war" in Iraq, whatever the malcontents believe in Washington think tanks.

That leaves Afghanistan and Pakistan, both in flames. In those places, the politics are reversed, with Obama having promised to defeat Al Qaeda by using Predators in Pakistan and more ground troops in Afghanistan. So far he is keeping his campaign pledges, while still proceeding cautiously in developing an overall plan. Neither the neoconservatives nor the generals are fully happy with Obama's early approach, which they see as pointed towards a diplomatic settlement instead of "winning" militarily. On this point, Secretary Gates seems to have the president's back, repeatedly warning that no military solution is possible.

Nevertheless, Obama is beginning an escalation with 17,000 troops bringing the American total in Afghanistan to over 50,000. Except for its political rationale, this is a puzzling military gesture. By comparison:

• In South Vietnam, the US deployed 500,000 troops on a battlefield of 67,000 square miles containing 19 million people

•n Iraq, we deployed 160,000 troops on a battlefield of 168,745 square miles, with 26 million people

•n Afghanistan, Obama plans to deploy some 60,000 US troops on a battlefield of 250,001 sqare miles with 30 million people

• And in Pakistan he has 100 special ops on the ground, with $400 million allocated for 85,000 tribal paramilitaries.

The geography and demographics are staggering. Obama cannot possibly be considering a military solution while deploying fewer American troops on larger and larger battlefields. It is hard to imagine that he plans a Vietnam-style escalation either. At the current rate of Afghanistan spending, the costs will reach over $1 trillion by the end of Obama's first term, while he risks his presidency on economic recovery.

Until a brave few in Congress begin to catch up, the critics of Afghanistan policy will have to launch a passionate and substantive debate over the "long war" ahead, oppose the 17,000 new troops as simply 17,000 more targets for the Taliban, sketch in the content of a diplomatic settlement and propose an exit strategy. The first arena for debate, recalling the 1965 Vietnam teach-ins on campuses, will be the blogosphere. The second will be Congressional hearings, with critics at the table. And the third phase is likely to be direct dialogue and engagement in the 2010 elections, district by district. At this point, however, the movement will have to engage MoveOn and many liberal Democrats who are mired in the lingering belief that Afghanistan is the "good war." (We might ask, what does that make Pakistan?)

There are still more battlefields in the long war. Obama will have to be persuaded to say no to an Israeli strike on Iran while he tries to engage Tehran on stability in Iraq and Afghanistan. Ultimately, Obama will also find ways to increase support for Palestinian aspirations, as the most effective approach to lessening Arab and Islamic support for jihad. It's a long way down the road, but his choices of George Mitchell as an envoy along with Charles Freeman to a high intelligence post are the most progressive and independent Middle East appointments in a generation.