The recently released Pew Global Attitudes Project poll shows that President Obama has lifted America’s image around the world to pre-9/11 levels. “Opinions of the United States are now about as positive as they were at the beginning of the decade before George W. Bush took office,” according to the Pew project. That’s the good news.

However, opinion in the Muslim world—while showing some positive movement, particularly in Indonesia—remains largely unfavorable. Ultimately, Pew concluded “the perception remains widespread among many Muslims that the U.S. could pose a military threat to their country.” Moreover—with the exception of Indonesia—more Muslims viewed the United States as an enemy rather than a partner (by a majority in Pakistan and the Palestinian Territories). So while Obama’s administration certainly employs a different style than the Bush administration (more multilateral than unilateral), the more pressing issue is whether the Obama administration represents any substantive change in U.S. foreign policy, which is at the heart of Muslim enmity towards America.

Much of the increase in favorable opinion of the United States amongst Muslims is probably due to President Obama’s decision to withdraw U.S. combat forces from Iraq by August 2010 and all remaining troops by December 2011. But whether the promise and hope of U.S. withdrawal will be met in reality remains to be seen. If attacks increase as U.S. troops withdraw (which is what happened in June after American forces moved out of urban centers), will Obama have the stomach and political will to leave Iraq if it is less than secure?

Even if Obama can keep his promise in Iraq, he is making the same mistakes in another Muslim country by pouring more troops into Afghanistan. According to the Pew poll, the overwhelming majority of Muslims want the U.S. and NATO to remove troops. While Obama apparently grasps the politics of an unpopular war in Iraq, what he doesn’t seem to understand is that occupation is occupation and that foreign military occupation of a Muslim country is a strategic mistake.

Foreign occupation reinforces the perception that the Afghan government is a propped up puppet of the United States rather than a sovereign government of a Muslim country. And just as it has been (and will continue to be) in Iraq, an occupying force in Afghanistan is a magnet for jihad (the same experience of the Soviet occupation in the 1980s). So just as Iraq must be left to the Iraqis—even if the outcome is less than perfect—the same is true in Afghanistan.

Moreover, occupation is one of the primary reasons cited by Osama bin Laden for making America a terrorist target. And the weight of historical evidence clearly demonstrates the direct linkage between occupation and terrorism. University of Chicago Professor Robert Pape’s study of suicide terrorism from 1980 to 2003 showed that central objective of suicide terrorism was to compel withdrawal from territory that the terrorists viewed as their homeland.

That Obama doesn’t seem to understand the perils of occupation is evident in how he treats Israel and the Palestinians. In his Cairo speech in June, the president called on the Palestinians to abandon violence, which is fair enough. But while he stated that “the United States does not accept the legitimacy of continued Israeli settlements,” he only said that such settlements be stopped, not abandoned. Yet how can he realistically expect the Palestinians to abandon violence if he doesn’t expect the Israelis to un-occupy Palestinian territory?

So President Obama may be more popular around the world—even in the Muslim world—but the real measure is not his poll numbers.Ultimately, the thrust of U.S. foreign policy must change. If not, America will not be any more secure than when George W. Bush occupied the Oval Office.