During his presidential campaign, Barack Obama repeatedly called for expanding the war in Afghanistan. Be careful what you wish for.

The bells of Afghanistan echo the Vietnam War. Like then, we have a powerful military establishment linked to civilian foreign and defense intellectuals clamoring for an expansive military adventure to protect us from an onrushing enemy. The pressure on President Barack Obama to substantially increase troop levels in Afghanistan is enhanced by a high-powered, hardly subtle campaign.

Vietnam cost more than 50,000 Americans killed in action, hundreds of thousands of Vietnamese dead or missing, untold numbers of maimed and wounded on both sides, and incalculable American treasure. Afghanistan promises to be as long and as expensive.

Tension and conflict between the military high command and the Obama administration over Afghanistan are obvious. Adm. Michael Mullen, chairman of the Joint Chiefs of Staff, in August described the Afghanistan security situation as “serious” and “deteriorating.” Less than a month later, he told a Senate panel that “probably” more troops were needed. Mullen’s remarks prefaced the report of Gen. Stanley McChrystal, the field commander in Afghanistan.

Predictably, McChrystal has called for 45,000 more troops. And equally predictable, his “confidential” report to his commander in chief was leaked to The Washington Post, using none other than Bob Woodward, the serial conduit for power holders (or grabbers?). Who leaked and why is a mindless Beltway parlor game; the simple answer will do: The leak clearly is designed to pressure President Obama.

McChrystal paints an impressive analysis of the war in Afghanistan and the shortcomings of our counterinsurgency responses. He suggests that failure is certain if he is denied additional troops. His report has been in circulation for nearly a month, yet the president has maintained that he will withhold a decision until he has charted a clear course. The White House take is that the United States must define its strategy before making any further commitment.

McChrystal and other military leaders, however, will apparently have none of that. The report’s conclusions are stated in urgent terms, citing the imminent danger of a Taliban triumph. Indeed, reports of the Taliban’s increasing successes mount, but that only draws into question whether an expanded military effort can do much to stem the tide against a Kabul government that is inept, corrupt and lacking of popular support. Meanwhile, the Taliban freely uses the soil of our ally Pakistan as a sanctuary and launching pad. Some ally.

Gen. David Petraeus, head of Central Command, weighed in with support for McChrystal’s recommendations. The generals are post-Vietnam, anxious to prove they are more adept in counterinsurgency. They have also learned to operate more effectively in the domestic political arena. They are not Gen. William Westmoreland.

Important civilian voices have lent their support, apparently well informed of the military’s thinking. Condoleezza Rice again has warned that if we abandon Afghanistan, we invite further terrorist attacks, reminding one of the dire “mushroom cloud” warnings she made before the Iraq debacle.

More ominously, Sen. John McCain soldiers on. Following the leak of McChrystal’s report, he attacked a “disconnect” between the military and the White House, as if the president is constitutionally, perhaps divinely, mandated to follow wherever the military leads. Since McCain campaigned for the presidency in 2008 as being best qualified to serve as commander in chief, he should know that the constitutional phrase asserts civilian supremacy. When Presidents Lyndon Johnson and Richard Nixon confronted unsound or incorrect military advice, McCain was a POW in Vietnam, unmindful of civilian-military clashes over Vietnam. Today, with the hindsight of history, we can look back over those conflicts and see that the wiser course was all too apparent. Clearly McCain in his certitude does not.

We will not hear much dissent among the political elite from McChrystal’s recommendations, aside from the usual array of war critics. But what is at work here is that vague, almost incalculable force: public opinion. Polls now reflect diminishing public support for our involvement and a corresponding increase in opposition.

The Afghanistan war has been difficult and long. McChrystal knows it will be even longer and more difficult — but he promises light at the end of the tunnel. Old idea, new garb.

The president is in a bind of his own making. How ironic. His campaign attempts to show his toughness have come back to bite him. Where were progressive voices then? In their zeal to pile on George W. Bush and Dick Cheney, they offered few criticisms of their own candidate, who eagerly promised to pursue a similar policy, only better. The futility of that approach should have been evident, but candidate Obama got a free ride.

Obama inherited an imperial America; he also inherited the need to maintain it with military force. In the meantime, whatever the wisdom or viability of McChrystal’s military solution, his mission seems predicated on maintaining a corrupt, ineffective regime in Kabul. Or is it? McChrystal has not said anything on the subject, but does he have contingency plans for supporting a coup in Afghanistan? We should remember the futility of coups we sponsored in South Vietnam that resulted only in still another incompetent general.

If Obama rejects McChrystal’s call for more troops, and carries on an inconclusive war interminably, he will have to shoulder the blame and carry the burden of “we told you so” barbs. The right, determined for the president’s policy initiatives to fail, enthusiastically urges a more expansive war. But that is not to suggest a moratorium on its criticism.

Obama has little wiggle room; he cannot continue the war he already has expanded without imperiling his presidency. Time is not his ally.

Stanley Kutler is the author of “The Wars of Watergate” and other writings.