Editor's note: Julian E. Zelizer is a professor of history and public affairs at Princeton University's Woodrow Wilson School. His new book, "Arsenal of Democracy: The Politics of National Security -- From World War II to the War on Terrorism," will be published in January by Basic Books. Zelizer writes widely about current events.
(CNN) -- On June 17, 1964, President Lyndon Johnson explained to The New York Times reporter James "Scotty" Reston why he had to stay the course in Vietnam by stabilizing the South Vietnamese government so that it could fight communism.
Johnson rejected calls for withdrawal that were being made by liberal Democrats as well as the proposal for neutralization promoted by France's Charles de Gaulle.
"So the only thing you've got left," Johnson said, "is try to make this thing more efficient and more effective and hold as strong as you can and keep this government as stable as you can and try to improve it as you can and that we're doing day and night."
During his recent speech at West Point, President Obama rejected the lessons that these kinds of stories tell us about Afghanistan. The president, saying that the comparison with Vietnam relies on a "false reading of history," pointed to three differences.
The first is that the U.S. is now part of a broad international coalition. The second is that in Vietnam the U.S. faced a "broad-based popular insurgency" whereas today, according to most polls, a large number of Afghans support foreign assistance. Last, Obama added, is that today Americans are responding to a very real threat that began with the vicious attack on 9/11.
Clearly, Obama feels defensive about this analogy and hopes to undercut liberal critics who are frustrated and disappointed with his decision.
In trying to separate himself from the experience of Johnson, however, Obama did not give an accurate account of what many commentators have been saying recently, and he downplayed crucial aspects of the 1960s that do in fact offer warnings for today.
Mark Twain once said that history does not repeat itself, but it rhymes. Most of those who have compared Afghanistan to Vietnam do not say that the situations were exactly the same politically or strategically. Nor is it inevitable that the surge in Afghanistan will be unsuccessful.
The point of the comparison is that it is impossible to ignore the fact that Obama faces similar challenges, as did Johnson when the "Americanization" of Vietnam began in the spring of 1965.
Both presidents entered the war despite the fact that many top advisers in the White House and in Congress were strongly warning against escalation.
In 1964, Johnson heard from voices ranging from Idaho liberal Frank Church to Georgia hawk Richard Russell that Vietnam was not critical to fighting communism and that the war was unwinnable. Their warnings proved to be accurate. Going into this decision, Obama heard comparable criticism as well.
Both presidents also expanded the war just as they were trying to shape a broad domestic agenda. Johnson was much further ahead of the game when he increased the number of ground troops in the war that he inherited. The war devastated Johnson's domestic efforts. Obama faces the same threat.
Both wars have been justified as wars of necessity. With Vietnam, proponents warned that the fall of Southeast Asia to communism would vastly strengthen the Soviet Union and China.
In an era when American schoolchildren were being taught to duck and cover under their desks in case of nuclear war, this warning about Vietnam also made the war seem essential. Today, the necessity stems from the claim that failure would resurrect the dangers we faced before 9/11.
And both presidents escalated wars where the path to victory and the potential costs -- in terms of human capital and budgetary obligations -- were unclear.
Despite the fact that Johnson confronted a very different kind of enemy, the risk today is enormously high. In Afghanistan, the U.S. is dealing with a war front that is notoriously treacherous, as the Soviets learned in the 1980s and the U.S. has learned since 2001. The U.S. is also depending on a highly corrupt and undependable government in Afghanistan.
While the promise of withdrawal in July 2011 might be accurate, presidential assurances of benchmarks and end games historically don't come true. The one constant in warfare is that it is unpredictable and difficult to control. One day after Obama's speech, Defense Secretary Robert Gates indicated that the deadline was not firm.
And the administration might very well be handcuffing itself to a strategy of more warfare as it keeps offering grave warnings about what a victory by the Taliban would mean.
These warnings will make it difficult in the long run for the administration to contain the operation or to withdraw forces unless it is absolutely clear that the Taliban has been defeated.
Democrats could find themselves feeling like their predecessors in the 1950s who were under political pressure to abide by the containment arguments outlined by President Harry Truman with the Truman Doctrine in 1947 -- first with Korea in 1950 and then with Vietnam.
Obama should not be so defensive about the comparisons with Vietnam. Rather, he should use Johnson's experience to help guide him as he makes crucial decisions in the months ahead and attempts to navigate the challenges of the wartime presidency.
In a conversation with a few of his closest advisers, Johnson said in 1964 that "It's damned easy to get in a war but it's gonna be awfully hard to ever extricate yourself if you get in."
In 1965, Johnson made the mistake of excluding those who were trying to warn him about the dangers of the war. Let's hope that this time around Obama does not repeat this error.
The opinions expressed in this commentary are solely those of Julian Zelizer.