This administration, which tends to treat the word “historical” as an epithet, might want to spend just a little more time looking back at those earlier situations. Historical analogies can be misleading, sure, but historical patterns teach you a lot, and if you study the crises that culminated in 1993-94, 1983-84, 1974-75, (weirdly, just about every decade), the outline’s pretty much the same:

Washington commits troops to a high-sounding cause in a faraway land, but completely misjudges the nature and extent of local resistance. After it wakes up to the mistake (which it won’t acknowledge publicly) the administration says it will never leave under duress, puts more troops on the ground, and ever more public emphasis on its lofty ideals. At the same time, of course, it tries like hell to shift the burden for front-line fighting onto local recruits or international forces. Then it gets blindsided by a major act of terror or insurgency. It vows to show resolve, but everybody on the ground sees it scrambling for the exits. The local clients or international stand-ins collapse. And, ready or not, it’s time to declare victory, if anyone will listen, and say adios to all those left behind.

In Somalia, after the horrific “Black Hawk Down” battle in October 1993 that killed 18 American soldiers (and cost some 1,200 Somalis their lives), most U.S. troops stayed for another four months. “I pray to God for the Somali people,” the American commander said as he boarded the chopper that flew him out to sea at last. “I pray that they will find a way to raise themselves above this anarchy and turmoil, and to build some kind of society based on love, instead of based on the gun.” Thanks, general. The U.S. didn’t close up shop completely until September 1994. A note was stuck on the front of the empty embassy warning any other Americans left behind that they should leave as best they could.

In Lebanon, 241 U.S. Marines were killed in October 1983 in a suicide attack on their barracks, but American forces didn’t actually pull out until February of the next year, when a key brigade of troops they’d trained to take their place mutinied against the American-endorsed government and joined up with Shiite militias. ‘‘You see that surf, I’m going in it," a 32-year-old U.S. Marine sergeant riding the last American armored personnel carrier on the Beirut beach told reporters. “We did our job, I’ll put it that way. Goodbye, folks.’’

Vietnam analogies usually are overdrawn. But the way things are going, it’s not hard to imagine a terrible moment when the Green Zone in Baghdad becomes the scene of a Saigon-style evacuation. Former CIA analyst Frank Snepp, whose book “Decent Interval” is the classic first-hand account of South Vietnam’s collapse, told me in an e-mail he’s been haunted by the parallels between the situation then and now:

“Imagine 1963: Religious extremists are creating chaos in the streets; the U.S. is debating whether to escalate and bring in more manpower to support a regime that is remote from the masses and largely a creature of our own invention,” he wrote. “Imagine 1969: We want out badly, are looking for an end-game and are attempting to shift more and more of the security role to indigenous forces, who prefer to sit on their hands and let us do their fighting for them. The decent interval of the ceasefire period, 1973-75, like the present in Iraq, is nothing more than a fig-leaf concept to give us a moment to withdraw gracefully, without losing face. And during my own years in Vietnam I met hundreds of [Ahmad] Chalabis [an allusion to the Pentagon’s pick to lead the new Iraq], men who sought to curry favor with us by pandering to our wishful thinking, feeding us whatever ‘intelligence’ they thought we wanted to hear. And in our desperate need to believe the best, we indulged them even in their most destructive artifices and corruption.”

The vital difference between Vietnam then and Iraq now is that the process of misjudgment, revelation, attempted escape and collapse is moving so much faster. The interval between the shock of the Tet offensive and the final fall of Saigon was seven years. Given the events of the last few days in Iraq, it’s an open question whether anything resembling genuine American resolve will last another seven months.

I’m among those who believe it has to. In this age of global terror, when every skirmish in an Iraqi slum becomes a satellite-broadcast allegory of American strength or weakness, the patterns set in Vietnam, Lebanon and Somalia have to be broken. But, let’s get real, nothing the administration has done so far will work, and as long as President George W. Bush and Presumptive Nominee John Kerry are sparring over what to do in Iraq–or, more often, what was done–the American position there will be undermined. If there’s another common denominator in Somalia, Lebanon and Vietnam, it’s that the public’s faith in the fight ended before the soldiers’.

Would we have been wiser to stay out of Iraq? You bet. Should we bail now? No. But we–and the Iraqis, and their neighbors–have got to have a much clearer picture, and soon, of where all this is supposed to lead. The president’s mantra that we’ll “stay the course” doesn’t make much sense when we’re on the shoals. Kerry’s notion that the United Nations or NATO can quickly assume much greater responsibility for establishing peace is equally out of touch with reality. (U.N. officials are frankly terrified they’ll be mere tools of Washington, or targets of the Iraqi insurgents, or, most likely, both. The U.N. itself is in crisis, afraid some of its best people will be blown away again, as they were last August, but equally concerned it will seem irrelevant if it stays out of Iraq altogether. “We’re quite aware that were damned if we do, and damned if we don’t,” as one senior U.N. official puts it.)

If there’s good news, it’s that the president’s position and the candidate’s are not that far apart. Put aside recriminations about the past and you see that in the future both men want to devote whatever resources are needed to stabilizing Iraq, while drawing in as much international support as possible. The problem for Bush is that he’s run out of credit with the international community. Kerry could–and should–give him some. In an op-ed piece in today’s Washington Post, the Democratic candidate even seems to be headed in that direction. “The president must rally the country around a clear and credible goal,” he writes. “The challenges are significant and the costs are high. But the stakes are too great to lose the support of the American people.” Kerry insists his is “not a partisan proposal. It is a matter of national honor and trust.”

Bush, for his part, has to wake up to reality. To borrow a phrase from conservative columnist Pat Buchanan, the president has to quit “succumbing to the whispers of neocon tempters about Churchillian immortality” and look at the options actually in front of him. If he wants the help of the rest of the wide world, he’s got to quit coddling his cozy little circle of friends. There can be no guarantees for favored companies like Halliburton and the American oil interests. And if we want peace with Iraq’s neighbors, especially Iran and Syria, we’d be wise to quit threatening them, and prudent to give up the notion we’ll be creating major military bases right on their borders. Finally, Bush, and Kerry, too, had better realize that Iraq is not going to be a beacon of democracy in the region anytime soon. It’s enough just to keep it from becoming a black hole. So let the Iraqis choose who they will as leaders, and live with it.

It was 36 years ago that President Lyndon Johnson, searching desperately for some way to extricate the United States from the mess he’d helped to create in Vietnam, announced that he would not seek nor accept his party’s nomination for re-election. In that speech, sincerely or not, he said “The United States will never accept a fake solution to this long and arduous struggle and call it peace.”

Today, precisely because of the fake hopes for decent intervals put forth in Vietnam–and Lebanon and Somalia–that’s truer than ever before. There’s no point kidding ourselves about how bad this situation is. This is no time for election-year posturing. We need unprecedented unity based on unprecedented dialogue and cooperation, because the precedents we have are simply unacceptable.