But once those friendly dictators fell, it was foolish to believe America could control the governments that came after - as two successive U.S. presidents found out.
The George W. Bush and Barack Obama administrations pushed a "democracy agenda" (as does Mitt Romney). Both mistakenly believed the Arab leaders and movements that received U.S. aid would show their gratitude.
Bush's effort to impose democracy on Iraq by arms failed miserably. The religious Shiite parties that won elections are more sensitive to the demands of Iran's ayatollahs than to Washington's pleas. Flush with oil money, they don't need to take American instructions.
As for Obama, whose famous Cairo speech in 2009 called for a new relationship between America and Islam, he misjudged the power of good intentions.
Initially, he waffled on supporting the Arab Spring but came around to supporting the Tahrir Square revolt and heading NATO's involvement in Libya. But the fall of Moammar Gadhafi left Libya with virtually no functioning institutions. The elected government was too weak to take control of a multitude of armed militias, including some jihadis from abroad.
In the meantime, the educated moderates who organized the revolts in Tunisia and Egypt proved unable to rally behind one leader. That meant Islamists, who had long organized in the mosque and underground, were best positioned to win elections.
Could Obama have done more to help nonreligious parties organize in Tunisia and Egypt? Perhaps. In Egypt, however, draconian laws have prevented U.S. officials from training locals in the mechanics of elections by penalizing monetary contributions from abroad.
Moreover, Obama could not compel moderate Arab opposition groups to join forces when they were so determined to form multiple parties. In Egypt, that guaranteed victory for the party of the Muslim Brotherhood and its presidential candidate, Mohammed Morsi.
Perhaps Obama can persuade the religiously conservative Morsi to behave like a pragmatist because he needs U.S. aid, international loans, and foreign investment (although neither Democrats nor Republicans have shown skill at using U.S. aid as political leverage). But, as we saw last week, Morsi is all too ready to bow to pressure from Islamic extremists on his right flank.
The anti-U.S. violence last week has led some critics to denounce Obama for "abandoning" Egypt's Hosni Mubarak and Libya's Gadhafi, thereby boosting jihadis and alienating our Arab Gulf allies. That argument is endorsed by strange bedfellows, including some Republicans, some Israeli analysts, the Saudis, and, most prominently, the Russians.
Officials and commentators in Moscow last week were eager to tell Americans, "I told you so" after the murders in Benghazi. As Aleksei K. Pushkov, head of Russia's parliamentary Foreign Affairs Committee, tweeted: "Under Gadhafi they didn't kill diplomats. Obama and Clinton are in shock? What did they expect - 'Democracy?' Even bigger surprises await them in Syria."
But what Pushkov and the others don't understand is that those Arab rulers had run out of shelf life. Their regimes had become rotten and economically frozen; an Arab youth bulge that was Internet savvy would no longer tolerate their rule.
U.S. officials had little to do with Mubarak's fall or the retreat of his aging, weak circle of military cronies. Perhaps they expedited Gadhafi's fall, but he couldn't have lasted much longer.
As for Syria, Obama is hanging back precisely because he fears a fragmented opposition will produce a sectarian, Islamist regime. Romney is urging more U.S. support for the Syrian opposition. I do, too, if only to speed up Bashar al-Assad's fall before more slaughter and before jihadis take full control.
No one, however, should have any illusions about a post-Assad "democracy." It will probably be run by Sunni Islamists, with moderates divided and Christians in flight. U.S. influence there won't be strong, even if we funnel in arms.
New governments in the Mideast will be cool to Washington because of religious pressures, because the Mideast peace process is dead, and because elections will produce populists who court their publics by thumbing their noses at Washington.
We can influence these governments at the margins. We can assist moderates who were marginalized in elections. We can insist that Arab governments refrain from attacking U.S. citizens and interests, and penalize them if they do. (If we "show strength" by bombing Iran, this is more likely to boomerang than win us renewed respect.)
But, in the coming decade, no matter which party wins the White House, our influence won't be what it once was. And we'll have difficulty in "shaping events" in the Middle East.
E-mail Trudy Rubin at firstname.lastname@example.org.