US Secretary of State Mike Pompeo accused Barack Obama on Thursday of sowing chaos in the Middle East by failing to adequately confront Islamist militants in a blistering critique of the policies of President Donald Trump’s predecessor.

Speaking in Cairo, where Obama gave a major speech in 2009 in the first year of his presidency, Republican Trump’s chief diplomat took on Obama by arguing that the Democratic former president had in effect misread and abandoned the Middle East.

The comments raised eyebrows in the US and abroad not the least because Trump himself is being criticized for his ambiguous plan announced last month to pull American troops out of Syria. While that decision’s timing is unclear, it is widely seen as abandoning the region and benefiting US rivals Russia and Iran.

“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 in a speech at the American University in Cairo in which he did not mention Obama by name but called him “another American” who gave a speech in the capital of the Arab world’s most populous nation.

Pompeo is touring the region to try to explain US strategy after Trump’s surprise announcement of an abrupt withdrawal of all 2,000 American troops from Syria, which rattled allies and shocked top US officials, prompting Defense Secretary Jim Mattis to resign.

It is highly unusual for an American secretary of state to deliver a speech in a foreign capital attacking a former US president. But Trump has frequently sought to belittle his predecessor and has reversed Obama policies on international issues such as the Iran nuclear deal, trade agreements and the Paris climate change accord as well as domestic policies.

Describing the United States as a “force for good” in the Middle East, Pompeo sought to reassure allies that Washington remained committed to the “complete dismantling” of the threat posed by the Islamic State militant group despite Trump’s decision to withdraw troops from Syria.

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

Trump this year abandoned that deal, pursuing instead what his administration has called 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.

‘Self-inflicted American shame’

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

In his June 2009 speech at Cairo University, Obama called for 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 long accused Obama of apologizing to the world for US actions abroad, a point that Republican presidential nominee Mitt Romney emphasized during his 2012 attempt to unseat Obama.

Pompeo‘s speech drew immediate criticism from Middle East experts as well as officials who served under Obama who accused the secretary of state 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.

“There is a lot of ambitious language, but very little actual commitment of US resources. You could read this as obscuring a continued US retrenchment from Middle Eastern commitments,” Alterman added.

On Twitter, Martin Indyk, who served in the Obama administration, called the speech “shameful Obama-bashing.”

Pompeo directly repudiated Obama’s 2009 Cairo speech, which was an overture by the then-new president to the Islamic world.

“Remember, it was here in this city that another American stood before you. 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.

“He told you that the United States and the Muslim world needed, quote, a new beginning, end of quote. 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.”