A recent ABC News/​Washington Post poll found that a majority of voters think the Afghan War is no longer worth fighting. Who can blame them? Last week’s combat deaths made 2009 the worst year yet for US casualties, and it’s become increasingly difficult to figure out what fixing the failed Afghan state has to do with American national security.

But while Americans are turning against the war, President Obama has staked his presidency on what he insists is a “war of necessity.”

It’s not surprising that many see a parallel with Lyndon Johnson, another president of grand domestic ambitions who wrecked his presidency with an unwinnable war.

But there’s another aspect of the LBJ parallel that deserves more attention. That’s liberals’ temperamental affinity for nation-building, which may help explain why Obama is doubling down on a bad bet.

Historian and Vietnam veteran Walter McDougall calls Vietnam the “Great Society War,” one shaped by liberals’ conviction that no social problem is too difficult for a determined and well-meaning government to fix.

As McDougall tells it, Defense Secretary Robert McNamara “put more than a hundred sociologists, ethnologists, and psychologists to work ‘modeling’ South Vietnamese society and seeking data sufficient ‘to describe it quantitatively and simulate its behavior on a computer.” “Dammit,” LBJ exclaimed to an aide in 1966, “We’ve got to see that the South Vietnamese government wins the battle… of crops and hearts and caring.”

True, Obama admits that we can’t “rebuild Afghanistan into a Jeffersonian democracy.” But the administration’s vision for Afghanistan is quixotic enough nonetheless.

In addition to troop increases, the Obama team plans a “civilian surge” that would double the number of development experts deployed to the region. (The Pentagon prefers the term “civilian uplift.”)

The Obama plan for the drug war in Afghanistan rests heavily on “crops, and hearts, and caring.” We’re supplying Afghan farmers with wheat seeds, fruit saplings, and loans, hoping to wean them from the lucrative drug trade, while at the same time targeting high-level drug kingpins.

So will the administration go after Afghan President Hamid Karzai’s running mate, Marshal Fahim, whom CIA officers strongly suspect of using his prior position as Karzai’s defense minister to transport heroin into Russia?

In Iraq, the administration wants more time to let the nation-builders work their magic. They’re pressuring Prime Minister Nouri al-Maliki to abandon a planned referendum that would force U.S. troops to leave a year ahead of schedule.

You’d think Obama would welcome a move that would help him honor a key campaign promise. But among other things, apparently we need more time to oversee joint exercises between the Iraqi Army and Kurdish militias — in the hopes that the two implacable enemies will learn to get along.

According to the U.S. top commander, Gen. Ray Odierno, Al Qaeda is “exploiting this fissure between the Arabs and the Kurds,” and “what we’re trying to do is close that fissure.”

The Right’s embrace of nation-building during the Bush years was perplexing. When the government announces a massive effort at social transformation, you expect conservatives to be the leading skeptics.

“When you hear the phrase ‘nation building,’ ” columnist George Will cautions, “remember, it is as preposterous as the phrase ‘orchid building.’ ” Yet even now, a majority of Republicans — 70 percent in the ABC/WaPo poll — back Obama on the Afghan war.

Meanwhile, the president is losing the liberals: Fewer than 20 percent of Democrats support increasing troop levels, and seven in 10 say the war hasn’t been worth the cost. Antiwar groups plan a series of protests for the eighth anniversary of the war in October, and Sen. Russ Feingold, D‑WI, demands a “flexible timetable” for withdrawal from Afghanistan.

But if history is any indication, stronger measures will be needed. Democrats, who seem obsessed with honoring Sen. Ted Kennedy’s legacy, might look at a bill the Massachusetts senator introduced in 2007.

Short and sweet, it was designed “to prohibit the use of funds for an escalation of United States forces in Iraq.” That measure never passed, but in the early ’70s, Congress successfully used strings attached to spending bills to wind down our involvement in Vietnam.

Obama has made Afghanistan a “liberal war;” ironically enough, it may also be a war from which only liberals can disentangle us.