The anti-American violence spreading across the Middle East is not, as some suggest, blowback for President Obama supporting the overthrow of friendly dictators — irresponsibly pushing out autocrats who kept a lid on the forces of Islamic radicalism. The current unrest is indeed a result of Obama’s feckless policies in the Middle East — but overthrowing dictators is not one of them.

When tens of thousands of Egyptians poured into Tahrir Square last year to demand an end to dictatorship, the Obama administration stood with the Egyptian regime. Obama’s handpicked envoy, Frank Wisner, declared that Hosni Mubarak “must stay in office” to implement reforms. Secretary of State Hillary Clinton the United States announced, “Our assessment is that the Egyptian government is stable and is looking for ways to respond to the legitimate needs and interests of the Egyptian people.” The hopes of ordinary Egyptians that Obama might stand with them soon gave way to disappointment and anger. Demonstrators began carrying signs that declared “Shame on you Obama!” and showed Mubarak depicted as Obama in his iconic “hope” image — with a caption that read “No You Can’t.”

Egyptians did not forget how in 2009 — the same year Obama gave his Cairo speech promising to “a new beginning between the United States and Muslims around the world” — Obama cut pro-democracy funding for Egypt in half. Or how Clinton declared, “I really consider President and Mrs. Mubarak to be friends of my family.” Egyptians saw that Obama only began to shift his position after the momentum had shifted to the protesters. As one opposition leader put it before Mubarak’s fall, Obama and his advisers “are just waiting to see which side wins and then they will claim to have backed them all along.” That is exactly what Obama did. His failure to stand up against Mubarak alienated the Egyptian people, and cost us our ability to influence the post-Mubarak transition.

Obama also didn’t support the overthrow of Moammar Gaddafi. Indeed, he explicitly rejected making his removal a military objective, declaring, “We are not going to use force to go beyond a well-defined goal — specifically, the protection of civilians in Libya.” Obama’s top military adviser, then-chairman of the Joint Chiefs of Staff Adm. Mike Mullen, went further declaring that “the goals of this campaign right now again are limited, and it isn’t about seeing him go. It’s about supporting the United Nations resolution, which talked to limiting or eliminating his ability to kill his own people, as well as support the humanitarian effort.” David Gregory pressed Mullen, asking: “So the mission can be accomplished, and Gaddafi can remain in power?” Mullen replied: “That’s certainly, potentially, one outcome.”

A State Department spokesman said that arming the rebels would be “illegal.” It was the British and French who insisted on making Gaddafi’s removal the goal of our intervention, and arming and training the rebels to accomplish it. They had to drag Obama into it. Thank goodness they did. Today, unlike the Egyptian people, the Libyan people don’t think we stood with their dictator. When Gaddafi did finally fall, the administration tried to claim that Obama was for his removal all along but was simply “leading from behind.” The truth is he wasn’t leading at all.

We see that lack of presidential leadership today in Syria, where Iran’s closest ally slaughters innocent men, women and children by the tens of thousands while Obama stands by and does nothing. The Syrian people can be excused for wondering: Where is Barack the Liberator? Obama’s failure to lift a finger to protect the population is alienating Syrians who will remember our reticence when Assad is gone. His failure to back responsible elements of the Syrian opposition is creating opportunity for Islamic radicals to seize control of a post-Assad Syria. And his failure to act is seen across the Middle East as a sign of American weakness and vacillation.

That is what is causing the unrest in the Middle East today — a perception of American weakness. Across the region, people see the United States in retreat. They see Obama pulling all U.S. forces out of Iraq and preparing to do the same in Afghanistan. They see an American ambassador killed in Libya, the flag of al-Qaeda raised over our embassy in Egypt, and our diplomats fleeing from Khartoum and Tunis. Instead of looking to the United States and asking, “Where are you, Obama?”, the crowds in Cairo today are chanting, “Obama, we are all Osama.”

The failure of Obama’s policies in the Middle East is not the fall of dictators in Cairo and Tripoli; it is the failure of leadership in Washington. On taking office, Obama promised to usher in a new era of popularity in the region. Well, ask yourself this: Are we more popular now than we were four years ago?

Marc A. Thiessen, a fellow with the American Enterprise Institute, writes a weekly online column for The Post.