CAIRO (Reuters) - U.S. Secretary of State Mike Pompeo on Thursday accused Barack Obama of sowing chaos by abandoning the Middle East to Islamist militants and Iranian influence in a blistering critique of the former president’s policies even as Pompeo’s boss, President Donald Trump, moves to pull American troops out of Syria.

In a speech at the American University in Cairo, Pompeo dispensed with a U.S. diplomatic tradition of avoiding public airing abroad of domestic disputes by blasting Obama at the site of a landmark 2009 speech by Trump’s predecessor aimed at improving relations with the Islamic world.

Pompeo presented America as “a force for good in the Middle East” and suggested Obama saw the United States as “a force for what ails the Middle East.”

Some former U.S. officials and analysts accused the top American diplomat of misreading history and camouflaging Trump’s own desire to reduce U.S. commitments in the region.

Pompeo accused Obama of underestimating “the tenacity and viciousness of radical Islamism,” of failing to adequately support the 2009 “Green Movement” mass protests against a disputed election in Iran, and faulted him for not bombing Syria in retaliation for chemical weapons use by government forces in its civil war.

“What did we learn from all of this? We learned that when America retreats, chaos often follows. When we neglect our friends, resentment builds. And when we partner with our enemies, they advance,” Pompeo said.

Pompeo did not mention Obama by name but called him “another American” who had given a speech in the capital of the Arab world’s most-populous nation. Obama’s office declined comment on the speech.

Pompeo is touring the region to try to explain U.S. strategy after Trump’s surprise announcement last month of an abrupt withdrawal of all 2,000 U.S. troops from Syria, which rattled allies, shocked top U.S. officials and prompted U.S. Defense Secretary Jim Mattis’s resignation.

It is highly unusual for an American secretary of state to give a speech abroad directly attacking a former U.S. president. Trump has reversed Obama’s policies on international issues such as the Iran nuclear deal, trade agreements and the Paris climate change accord as well as a host of domestic policies.

Pompeo sought to reassure allies that Washington remains committed to the “complete dismantling” of the threat posed by the Islamic State militant group and to ending Iranian influence in Syria despite Trump’s decision to withdraw troops there.

“In Syria, the United States will use diplomacy and work with our partners to expel every last Iranian boot,” Pompeo said.

Pompeo faulted what he called Obama’s “desire for peace at any cost” that led him to reach the 2015 nuclear deal under which Iran agreed to curtail its nuclear weapons program in exchange for easing of international economic sanctions.

Trump last year abandoned that deal, pursuing instead a policy of “maximum pressure” on Iran to try to force it to limit its nuclear program, curtail its ballistic missile activities and cease supporting proxy forces in Syria, Iraq, Yemen and Lebanon.

Slideshow ( 19 images )

Iran’s foreign minister, Mohammad Javad Zarif, mocked Pompeo’s speech, writing on Twitter: “Whenever/wherever US interferes, chaos, repression and resentment follow.”

Many people in the Middle East are likely to disagree with Pompeo’s assertion that the United States is a force for good in the region. Policies such as U.S. support for Israel, the American-backed 1953 coup that overthrew Iran’s popular Prime Minister Mohammed Mossadegh and the 2003 U.S. invasion of Iraq to topple President Saddam Hussein remain deeply controversial in the region.

‘SELF-INFLICTED AMERICAN SHAME’

Slideshow ( 19 images )

In his June 2009 Cairo University speech, Obama advocated better mutual understanding between the Islamic world and the West and said both should do more to confront violent extremism. As a result, Republicans have accused Obama of apologizing to the world for U.S. actions abroad.

“The good news,” Pompeo said, “is this: The age of self-inflicted American shame is over. And so are the policies that produced so much needless suffering.”

Some Middle East experts and officials who served under Obama accused Pompeo of violating the American tradition that “politics stops at the water’s edge.”

“It feels a little bit as if the approach is to ‘talk loudly and carry a small stick,’” said Jon Alterman, director of the Middle East program at Washington’s Center for Strategic and International Studies think tank.

“You could read this as obscuring a continued U.S. retrenchment from Middle Eastern commitments,” Alterman added.

Pompeo received support from United Arab Emirates Minister of State for Foreign Affairs Anwar Gargash, who said on Twitter that “Washington, through its secretary of state, is asserting the importance of its alliances and supporting its friends.”

Pompeo pointedly repudiated Obama’s 2009 speech.

“He told you that radical Islamist terrorism does not stem from an ideology. He told you that 9/11 (the Sept. 11, 2001, al Qaeda attacks on the United States) led my country to abandon its ideals, particularly in the Middle East,” Pompeo said.

“The results of these misjudgments have been dire,” Pompeo added. “In falsely seeing ourselves as a force for what ails the Middle East, we were timid in asserting ourselves when the time and our partners demanded it.”