An Iranian photographer caught the image of the mushroom cloud over Beirut – and over the headquarters of the United States Marines there. He had been watching from afar and waiting as a yellow Mercedes truck packed with thousands of pounds of explosives and inflammable gas plowed through concertina-wire barriers, sped past sentries, and drove straight into the lobby of what was called the Batallion Landing Team, or BLT, headquarters near the city’s international airport.

The Iranian snapped the shutter, preserving for posterity that moment exactly 30 years ago today when Americans began to learn just how vulnerable they were when they ventured to impose their ideas of stability in the Middle East and the Muslim world. Sadly, it was a lesson that had to be relearned again and again, and among some – like those clamoring for greater American and international intervention in Syria – it still may not be understood.

Why were we there? Because the year before, Israel had invaded Lebanon to wipe out the forces of the Palestine Liberation Organization based there, and stayed to try to impose a Lebanese government to its liking. But when Israel’s Lebanese allies slaughtered hundreds of innocent Palestinian refugees in the Sabra and Shatila camps, a multinational force was organized to act as a buffer among the many factions fighting each other in Lebanon, and, eventually, to cover the Israeli withdrawal from Beirut.

The Western forces soon found they had few friends, and many enemies, especially the Syrians, who also occupied part of the country, and the Iranians, who were grooming members of a group now known as Hezbollah to act as shock troops for the Islamic revolution in Lebanon and the Muslim world.

As the smoke cleared on October 23, 1983, and soldiers struggled with bleeding hands to clear away the rubble burying their comrades, the extent of the carnage became apparent: in all, the bomb killed 241 members of the United States military, the vast majority of them Marines. A few minutes later, another suicide bomber hit a French military barracks, slaughtering 59 of France’s paratroopers. But Western leaders vowed that the multinational peacekeeping operations in Lebanon would go on. Stability there was “central to our credibility on a global scale,” said President Ronald Reagan. (How often have we heard that costly word “credibility” of late? It is so easy to say, so hard to define.)

It didn’t take military genius or foresight to understand the enormity of the risks faced by the Marines. But the warning signs were ignored: A joint Syrian, Iranian and Lebanese terror operation very similar to the airport attack had blown up the American embassy in Beirut six months earlier, killing 63 people, among them virtually the entire staff of the CIA station. The Marines on patrol and at their headquarters continued to come under fire almost daily, and could never be sure who were their friends and who were their enemies. “This wasn’t a war,” wrote Italian journalist Oriana Fallaci. “It was a feud between Mafiosi who rubbed each other out with mortars or cannons.”

Only four days before the BLT headquarters got hit, on October 19, President Reagan had faced reporters asking why American troops were stationed on such vulnerable ground. It was perfectly clear already that the 1,600 Marines there were in imminent danger, their position almost indefensible. “They are part of a multinational force,” Reagan replied. “Their sector just happens to be the airport, and airports just happen to be flat.”

Then as now, inside the Washington Beltway hubris and glibness go hand in hand.

“The bombing was the direct outgrowth of our leaders’ having made available a target of unprecedented magnitude in the center of a chaotic situation,” wrote Eric Hammel in his gritty, vivid 1984 study of the Marine deployment, The Root, which is what many of the soldiers called the city where they fought and died.

Four months after the October 23 bombing, the entire American plan for “stability in Lebanon” collapsed and the Reagan administration withdrew its forces. The United States survived. And when it decided to go to war against Saddam Hussein’s Iraq in 1990, it forged an alliance with Saddam’s old enemy, Syrian President Hafez al-Assad. As part of that deal, it effectively ceded control to Damascus over as much of Lebanon as it wanted. Today, the Obama administration is looking for ways to force that dictator’s son, Bashar Assad, to relinquish power. Despite insistent pressure from some of his close advisors, like U.N. Ambassador Samantha Power, Obama hesitates to get too deeply involved. But the military option has not been taken off the table, and the possibility remains that, one way or another, the United States will get sucked into the Middle Eastern maelstrom once again.

Last night, on the eve of today’s sad anniversary, I sent Ryan Crocker a note asking what lessons he thought had been learned from the experience in Beirut. Crocker gained fame over the last decade as the U.S. ambassador to Pakistan, Iraq and Afghanistan. He was the most experienced troubleshooter in the American Foreign Service. But in the early 1980s, Crocker was the diplomat in charge of the Beirut embassy’s political section. He was the first diplomat on the scene to witness the butchery in Sabra and Shatila in September 1982. He was blown against the wall of his office by the explosion that brought down the entire front of the embassy in April 1983. And he was there in Beirut when the explosive cloud rose over the BLT Headquarters 30 years ago.

“Beirut for me was always about those hard lessons of the Middle East,” says Crocker. “Be careful what you get into and beware the laws of unintended consequences. We thought an Israeli campaign to get rid of the PLO would be a good thing. What we got instead was a Syria-Iran strategic partnership that still endures, and a far more lethal enemy: Hezbollah. We got the PLO out of Beirut, but we got Bashir [Gemayel, a Christian warlord and Israeli ally] elected [president], not understanding we had crossed a Syrian red line. He is assassinated, the IDF [Israel Defense Forces] invades West Beirut, the LF [Lebanese Forces] carries out the Shatila massacre and we are guilty. So we send the Marines back on a mission of presence. No strategy, no goal. Just be there. The rest, as they say, is history.”

“Did we learn anything? Probably not,” says Crocker. “We had Somalia afterwards and Iraq. Mercifully Obama has stayed out of Syria, but I think that reflects his natural caution rather than any lessons absorbed from Beirut.”

In the Middle East, those who refuse to learn from history are condemned to repeat it, as the saying goes, and many are condemned to die in the process.