Long before the intervention in Libya -- before Afghanistan or Iraq, or even Vietnam -- the United States found itself involved in a peculiar operation on the southern coast of Cuba, at a place called the Bay of Pigs.

Starting in the early hours of April 17, 1961, approximately 1,400 Cuban exiles, supplied and backed by the CIA and Pentagon, attempted to invade their homeland and overthrow Fidel Castro. The exile force was routed within days and sent fleeing to the swamps. Castro crowed with victory, while the new administration of John F. Kennedy wallowed in humiliation. “How could we have been so stupid?” President Kennedy muttered to his aides.

Sunday is the 50th anniversary of the invasion of Cuba, and it arrives with Kennedy’s question still begging for an answer. Not just regarding the Bay of Pigs, but a host of other entanglements that followed. The United States went on to engage in no fewer than two dozen forceful foreign interventions after 1961, from Southeast Asia to the Middle East and Central America. And that was just the 20th century. Then came the 21st, and 9/11, and Iraq and Afghanistan. And now, Libya.

Click for a timeline detailing the Bay of Pigs invasion

Given the variety of American interventions -- some small, others massive; some covert, others overt; some undertaken for humanitarian goals, others for self-interest or self-defense -- it may be misleading to lump apples and oranges and draw conclusions about the fruits they bear. Nonetheless, if there is one element that nearly all U.S. interventions have shared since the Bay of Pigs -- the elephant, as it were, in the Situation Room -- it is their tendency to merit the observation Arthur M. Schlesinger, Jr. made in his journal after the 1961 debacle: “We not only look like imperialists; we look like ineffectual imperialists, which is worse,” wrote the presidential adviser; “and we look like stupid, ineffectual imperialists, which is worst of all.”

Certainly, there have been arguable successes. President Ronald Reagan’s minor foray into Grenada and President George H.W. Bush’s into Panama are good candidates, as is the Persian Gulf War of 1991 (if we can forget that it set the stage for what came later in Iraq). President Bill Clinton’s 1999 effort in Kosovo also qualifies. But it is worth asking, given this country’s generally sorry history of intervention over the past 50 years, why we keep going back for more, like a child who can’t keep his hand off a hot burner. We seem driven by an almost pathological compulsion to revisit the pain -- or to suffer the delusion that somehow, this time, we’ll get a more pleasant result.

Regarding the current intervention in Libya, President Obama has assured us we will not be there long this spring. But Obama, born four months after the Bay of Pigs, has lived through enough of these interventions to know that reality has its own way of intervening on even the best laid plans. Already, the days have turned into weeks, and soon will become months.

Clearly, there are times when the United States simply cannot avoid applying force abroad. But our leaders should never be fooled into thinking it’s going to be easy, as John Kennedy apparently was by the CIA’s assurances that the Cuban population would rise up in support of the Bay of Pigs invasion.

By the same token, when a president tells the American people that an intervention will be quick and painless, he should be greeted with no less skepticism than you’d give a home-improvement contractor bidding to renovate your kitchen. You can be pretty sure the job’s going to cost twice as much and last twice as long as promised. If you’re lucky.

As the U.S. and NATO allies enter the fifth week in Libya, and as the price tag rises to more than $1 billion, let us recall that the Bay of Pigs lasted just five days and cost a mere $46 million (less than the average budget of a Hollywood movie these days). There is no denying that the suffering it caused was acute. American casualties numbered 114, including Cuban exiles and four airmen from the Alabama Air National Guard. The Kennedy administration did not fully recover from the setback until the Cuban Missile Crisis eighteen months later, and the credibility of the United States took years to heal. But reflecting back on those fateful days in 1961, we know that things could have been worse. Indeed, to judge by our more recent history of interventions, they usually are.

Jim Rasenberger (jimrasenberger.com) is the author of the new book, “The Brilliant Disaster – JFK, Castro, and America’s Doomed Invasion of Cuba’s Bay of Pigs.”