Those who cannot remember the past are condemned to repeat it. — George Santayana

I’m having the strangest sense of deja vu over the last eighteen months or so, and the attacks on two diplomatic missions in the Middle East over the last 24 hours has only intensified it. Once again we have an American government that either tacitly or actively undermined an ally in the region in favor of supposedly democratic Islamist radicals, and once again we have an American government that gets taken by surprise when the government that results either fails to protect our embassies and consulates or arguably participated in an attack on them. Once again, the response to those attacks have been more mea culpa than mighty, and once again the weakness of the response puts our other diplomatic missions at risk.

It’s looking a lot like 1979 all over again.

In that year, President Jimmy Carter abandoned a key regional ally, Shah Mohammed Reza Pahlavi of Iran, who was no one’s idea of a nice guy. But we didn’t need Pahlavi to be a nice guy; we needed him to stand up against the Soviet Union. The CIA had squelched an earlier democratization movement in the late 1950s to maintain the monarchy and its influence in Iran, and apparently some in the US government thought Ruhollah Khomeini would bring that democratization to fruition in 1979. The Shah had to flee after his American allies withdrew their support, and Khomeini imposed a theocracy with a 12th-century mindset on what had formerly been one of the most liberalized Muslim nations in the region. When Pahlavi came to the US for medical treatment a few months later, a demonstration of “students” overran the American embassy in Tehran and took dozens of diplomatic personnel hostage, holding them for 444 days.

Eighteen months ago, we abandoned a key ally in Egypt, President Hosni Mubarak, who likewise was no one’s idea of a nice guy. But he had kept the Pax Americana in the Middle East for three decades, even when his predecessor Anwar Sadat got assassinated by Islamist radicals for doing so. Once again, we had an American government encourage the “democracy” movement run by radical Islamists in chasing our ally out of power. Once again, we seem surprised when the radical Islamists put radical Islamists in power. And once again we have “students” assaulting our embassy in the capital, this time Cairo, without so much as an apology from the radical Islamist government now running the nation.

The trend is even worse in Libya. Not only did our consulate get attacked, but four of our diplomatic personnel were murdered, including Ambassador Chris Stevens, who went to the consulate to rescue his staff:

The U.S. ambassador to Libya and three American members of his staff were killed in the attack on the U.S. consulate in the eastern city of Benghazi by protesters angry over a film that ridiculed Islam’s Prophet Muhammad, Libyan officials said Wednesday. They said Ambassador Chris Stevens was killed Tuesday night when he and a group of embassy employees went to the consulate to try to evacuate staff as the building came under attack by a mob guns and rocket propelled grenades. The three Libyan officials who confirmed the deaths were deputy interior minister for eastern Libya Wanis al-Sharaf; Benghazi security chief Abdel-Basit Haroun; and Benghazi city council and security official Ahmed Bousinia.

Mubarak looked like a saint next to Moammar Qaddafi, and few mourned his fall from power. The outcome is still more in doubt in Libya than in Egypt, where the Muslim Brotherhood have seized control of everything. But Qaddafi had at least been somewhat more cooperative since the fall of Saddam Hussein, and the West’s military attack on Qaddafi that caused his fall — led by the US initially — sent a big message on the futility of cooperation with the US and the West to all of the other governments in the region.

This outcome from the so-called “Arab Spring” was obvious almost from the start, and certainly from the moment we tossed Mubarak to the wolves. We’d lived through it before. The Obama administration failed to learn from the past, and so we get to repeat it.