The outlines of President Obama’s reelection strategy are becoming more distinct. He’ll bet that the faltering recovery has enough momentum to sell, particularly to college-educated suburban independents. He’ll find a way to cut a deal with Republicans on deficits that doesn’t completely derail the recovery.

At the same time, he’ll draw bright lines to defend largely social issues that appeal to both his base and to independents — ending “don’t ask, don’t tell”; defending Planned Parenthood and family planning; protecting the environment. He’ll contrast Republican promises for more tax cuts to the rich with his plan to invest in areas vital to our future — education, innovation, infrastructure.

But in addition to the economy, the disastrous war in Afghanistan threatens to upend this game plan.

Afghanistan is the “good war” that has gone bad. Obama bought into the fantasies of Gen. David Petraeus and the new generation of counterinsurgency mavens, who argued that we could fend off the Taliban, hunt the remnants of al-Qaeda, and build an operating nation in Afghanistan, with a government that could provide minimum security for its people. The president added his own caution: we’d have a surge but begin to withdraw U.S. forces in July of this year.

But it all went bad. The Karzai government was more corrupt and more incompetent than the generals admitted. The Taliban proved more resourceful; the tribal relations more indecipherable. The new generation of counterinsurgency mavens proved no wiser than the Vietnam generation. Defense Secretary Robert Gates concluded that any future Pentagon secretary who advises a president to fight wars like those in Iraq and Afghanistan “should have his head examined.”

The White House started pointing to 2014 as the time when U.S. troops would depart, quietly planning to extend what is already America’s longest war. “Unless the people force this issue from the grass roots, sources in the Pentagon tell me we’re looking at a token 10,000-12,000 troop withdrawal [in July 2011] with a sketchy timeline — 2014 or even longer — for our continued military presence,” said Matthew Hoh, a former Marine who resigned his Afghanistan post in protest and now serves as director of the Afghanistan Study Group.

Antiwar sentiment is at the heart of Obama’s base — and also of his appeal to independent voters. His 2008 candidacy was defined as that of the one leader who opposed the Iraq war from the beginning and who pledged to bring it to a close. Buoyed by his election and his commitment to draw down troops from Iraq, liberals largely gave Obama a pass on the Afghanistan surge, placated by his commitment to a time certain to begin getting troops out.

Antiwar sentiment didn’t disappear, however, it just went mainstream. As the Great Recession exposed the breadth of America’s problems and the war continued to waste lives and resources, support eroded steadily. A January Gallup poll reported that 72 percent of American voters want to “speed up” the withdrawal of troops from the 2014 date. Eighty-six percent of Democrats, 72 percent of independents and 61 percent of Republicans favored a more rapid withdrawal.

And liberal patience is exhausted. Sen. Barbara Boxer — joined, remarkably, by Sen. Richard Durbin, the second-ranking Democrat in the Senate and the closest personally to President Obama — has introduced a resolution demanding that the president lay out a plan for withdrawal with a “date certain” for the end. The Democratic National Committee, whose members are gearing up for the president’s reelection campaign, passed a resolution introduced by Rep. Barbara Lee that demands a “swift withdrawal” of troops and contractors, starting with a “significant and sizable reduction [of troops] no later than July 2011.”

This argument is likely to explode as we approach the president’s “beginning of withdrawal” date of July 2011. The financial costs of the war — the $10 billion a month expended on it would be sufficient to erase the debilitating debts of all of the states combined this year — are increasingly indefensible. The human costs — with some 12,000 U.S. dead and wounded, hundreds of thousands of Afghan casualties, millions displaced — are mounting. The military is pushing the president to stay the course, to minimize any force reduction until the situation stabilizes.

One can sympathize with the dilemma Obama faces. He’s already under attack from the right for being weak in Libya. He is urged by Sen. John McCain and others to soldier on despite wasting billions on corruption in Afghanistan, with no clear indication of how the war provides for U.S. security. Making the case to allies and jingoists that we should no longer play the role of “indispensable nation” isn’t easy.

But clearly it is time for the president to declare victory and get out of Afghanistan. Al-Qaeda has been reduced to remnants. We can’t and shouldn’t afford the human, moral or fiscal costs of continued occupation in Afghanistan, and the people who live there will have to decide what kind of nation they build, if any. We can support smart diplomacy to bring a political resolution to this civil war.

Defending Planned Parenthood, the EPA, Medicare and Social Security puts the administration on the side of the vast majority of Americans. The Tea Party Republican extremists are helping to reenergize the president’s base, but this president has said that “the nation that I’m most interested in building is our own.” He is about to find out just how seriously his own supporters take that pledge.