It’s a new day in the Arab world  and, let’s hope, in American relations to the Arab world.

The truth is that the United States has been behind the curve not only in Tunisia and Egypt for the last few weeks, but in the entire Middle East for decades. We supported corrupt autocrats as long as they kept oil flowing and weren’t too aggressive toward Israel. Even in the last month, we sometimes seemed as out of touch with the region’s youth as a Ben Ali or a Mubarak. Recognizing that crafting foreign policy is 1,000 times harder than it looks, let me suggest four lessons to draw from our mistakes:

1.) Stop treating Islamic fundamentalism as a bogyman and allowing it to drive American foreign policy. American paranoia about Islamism has done as much damage as Muslim fundamentalism itself.

In Somalia, it led the U.S. to wink at a 2006 Ethiopian invasion that was catastrophic for Somalis and resulted in more Islamic extremism there. And in Egypt, our foreboding about Islamism paralyzed us and put us on the wrong side of history.

We tie ourselves in knots when we act as if democracy is good for the United States and Israel but not for the Arab world. For far too long, we’ve treated the Arab world as just an oil field.

Too many Americans bought into a lazy stereotype that Arab countries were inhospitable for democracy, or that the beneficiaries of popular rule would be extremists like Osama bin Laden. Tunisians and Egyptians have shattered that stereotype, and the biggest loser will be Al Qaeda. We don’t know what lies ahead for Egypt  and there is a considerable risk that those in power will attempt to preserve Mubarakism without Mr. Mubarak  but already Egyptians have demonstrated the power of nonviolence in a way that undermines the entire extremist narrative. It will be fascinating to see whether more Palestinians embrace mass nonviolent protests in the West Bank as a strategy to confront illegal Israeli settlements and land grabs.