Secretary of State Mike Pompeo on Thursday delivered a speech in Cairo, Egypt, in which he laid out the Trump administration’s roadmap for the Middle East and ripped into former President Barack Obama’s foreign policy.

“The age of self-inflicted American shame is over, and so are the policies that produced so much needless suffering,” Pompeo said to an audience at American University in Cairo. “The United States under President Trump has reasserted its traditional role as a force for good in this region, because we’ve learned from our mistakes.”

Pompeo’s speech was the antithesis of an address Obama gave in the Egyptian capital in 2009, in which the former president pledged to work toward healing the wounds he said were created by the Bush administration’s approach to counterterrorism. At the time, Obama called for “a new beginning between the United States and Muslims around the world.”

President Barack Obama delivers a speech in the Grand Hall of Cairo University June 4, 2009. Goran Tomasevic/Reuters

‘When America retreats, chaos often follows’

Over the course of his speech, Pompeo accused Obama of breeding chaos in the Middle East by being too soft on extremism. Employing a tactic upon which Obama has often relied when rebuking President Donald Trump, the secretary of state did not mention Obama’s name once.

“It was here, here in this city, another American stood before you,” said Pompeo. “He told you that radical Islamist terrorism does not stem from an ideology. He told you 9/11 led my country to abandon its ideals, particularly in the Middle East. He told you that the United States and the Muslim world needed ‘a new beginning.'”

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

The secretary of state also outlined various ways in which he felt Trump’s predecessor fell short as commander-in-chief: failing to confront Syrian President Bashar al-Assad, softening the US government’s stance toward Iran, and allowing for the rise of the Islamic State group, or ISIS.

“We learned that when America retreats, chaos often follows,” Pompeo said. “When we neglect our friends, resentment builds. And when we partner with our enemies, they advance.”

Pompeo warned of the consequences of American retreat, even as Trump seeks to withdraw the US from Syria and Afghanistan

His speech came as the Trump administration faces broad criticism over its foreign policy, particularly in relation to the Middle East.

U.S. Marines with 3rd Battalion, 7th Marine Regiment, attached to Special Purpose Marine Air-Ground Task Force, Crisis Response-Central Command, prepare to board an MV-22 Osprey on their way to a site near At-Tanf Garrison, Syria, Sept. 7, 2018. U.S. Marine Corps photo by Cpl. Carlos Lopez

The Syria withdrawal announcement has prompted concerns Trump is essentially gifting the territory to Iran and Russia, and opening the door for Turkey to go after a the Kurds — fierce fighters who’ve played a vital role in combatting ISIS. Many are also concerned a US withdrawal would create a path for ISIS to make a comeback.

Pompeo commented, however, on the detrimental consequences of America retreating and the danger of “neglecting” friends.

Ned Price, a former CIA analyst who also served on the National Security Council under Obama, was unimpressed by Pompeo’s speech.

“Pompeo’s speech showcases this administration’s twin obsessions: President Obama and Iran,” Price told INSIDER. “Nothing could be more on-brand for Pompeo and this administration than taking on a nearly decade-old speech, while completely missing its key lessons, all of which have stood the test of time despite the region’s intervening turmoil.”

“What Pompeo also failed to recognize is that Obama’s speech was aimed at the region’s people; his own speech today was directed at its autocrats,” Price added. “That’s not to say that America shouldn’t address the world’s leaders. But Pompeo seems to have intentionally distorted the intent and audience of President Obama’s Cairo address and ignored the strategically important initiatives it spawned.”

Iranian foreign minister Mohammad Javad Zarif also promptly reacted to Pompeo’s speech, repudiating the secretary of state for his verbal attacks against Tehran.

“Whenever/wherever US interferes, chaos, repression & resentment follow,” Zarif tweeted. “The day Iran mimics US clients & @SecPompeo’s ‘human rights models’-be it the Shah or current butchers-to become a ‘normal’ country is the day hell freezes over. Best for the US to just get over loss of Iran.”