In a September 21 speech insisting that the United States must “stay the course” in Iraq, President Bush warned that an early military withdrawal from that country would encourage Al Qaeda and other terrorist organizations. Weak U.S. responses to challenges over the past quarter century have emboldened such people, Bush argued. Among other examples, the president cited the decisions to withdraw troops from Lebanon and Somalia after American forces suffered casualties.

Hawkish pundits have made similar allegations for years. But it is a curious line of argument with ominous implications. President Bush and his supporters clearly assume that the United States should have stayed in both Lebanon and Somalia. The mistake, in their opinion, was not the original decision to intervene but to limit American losses and terminate the missions. This is a classic case of learning the wrong lessons from history.

Even hawkish Rep. Dana Rohrabacher (R‑CA), who was a Special Assistant to President Reagan in the 1980s, admits that the decision to send troops into Lebanon was perhaps the worst foreign policy mistake of Reagan’s presidency. The United States promptly found itself in the middle of a civil war as a de facto ally of the Christian-dominated Lebanese government. American troops became entangled in skirmishes with Muslim militias, and U.S. battleships off the coast proceeded to shell Muslim villages. The disastrous intervention culminated with an attack by a suicide car bomber against the Marine barracks in Beirut that left 241 Marines dead. A few months later, President Reagan cut his losses and pulled out of Lebanon.

The Somalia intervention was equally ill-starred. Although President George H.W. Bush sent troops into that country on a humanitarian relief mission, President Clinton soon signed on to the U.N.‘s far more ambitious nation-building project. The United States then became entangled in another multisided civil war. One faction, headed by warlord Mohammed Farah Aideed, increasingly regarded the U.S. forces as an obstacle to its goals. When Washington decided to carry out the U.N.‘s edict to arrest Aideed and his followers, Aideed’s militias struck back with a vengeance. The skirmishes culminated in an ambush in the capital city, Mogadishu, which left 18 elite Army Rangers dead. Shortly thereafter, President Clinton withdrew U.S. forces.

Both Reagan and Clinton made the right decision. It was not a mistake to withdraw and limit our losses. The real mistake was the decision to intervene in such strategically and economically irrelevant snake pits in the first place.

Those who argue that the United States should have stayed the course in Lebanon and Somalia apparently have a masochistic streak. Both countries were in the throes of massive disorder. Indeed, Iraq today is relatively stable compared to either Lebanon or Somalia at the time of the U.S. intervention. Staying on after the initial disasters would have entangled the United States in multi-year ventures that likely would have cost thousands of American lives. Indeed, it is entirely possible that we would still be bogged down in those quagmires.

Yes, Al Qaeda and other terrorist groups apparently concluded that the Lebanon and Somalia episodes showed that U.S. leaders and the American people have no stomach for enduring murky missions that entail significant casualties. They are likely to draw a similar lesson if the United States withdraws from Iraq without an irrefutable triumph. Indeed, that is why it is imperative to be cautious about a decision to intervene in the first place.

Military missions should not be undertaken unless there are indisputably vital American security interests at stake. No such interests were at stake in Lebanon and Somalia. Once the missions turned sour, U.S. policymakers were left with a choice between a bad option and a worse one. The bad option was to withdraw, even though the move might embolden America’s adversaries. But it would have been worse to have persisted with foolish and unnecessary ventures at the cost of far more American lives–and with still no realistic prospect of success.

The Bush administration confronts a similar choice today in Iraq. A decision to withdraw and leave Iraq to its own fate is not without cost. America’s terrorist adversaries will certainly portray a pull-out as a defeat for U.S. policy. The cost of staying on indefinitely in a dire security environment is even worse. President Bush and his advisors need to consider the possibility that the United States might stay in Iraq for many years to come and still not achieve its policy goals. Moreover, the costs of such a strategy in blood and treasure would be far more than the nearly $200 billion already spent and the 1,900 fatalities already suffered.

As in Lebanon and Somalia, it would have been better if the United States had never launched the ill-advised nation-building crusade in Iraq. Unfortunately, that is not the case, and so we now must choose between two bad alternatives. Since President Bush has learned the wrong lessons from history, he seems determined to pursue the least advisable one.