The man who once complained that “Islam hates us” described it as “one of the world’s great faiths.” He said the fight against terrorism was not a “battle between different faiths,” as some of his advisers had argued, but a struggle “between barbaric criminals who seek to obliterate human life and decent people, all in the name of religion.” He urged Muslim leaders to drive extremists “out of your places of worship,” “out of your communities,” “out of your holy land” and “out of this earth.”

But he provided no guidance as to how the war against extremism could be won, and showed no appreciation for the fact that Wahhabism, the fundamentalist Sunni orthodoxy that gives legitimacy to Saudi Arabia’s royal family, has inspired ISIS and most other regional terrorist groups. Nor did he suggest, as President Barack Obama often did, that Muslim countries are unlikely to wipe out extremism until they reform their economies and political systems so their people have ways to address their grievances, to participate in governing, to obtain an education and jobs.

Mr. Trump chose instead to single out Iran, the leading Shiite-majority state and Saudi Arabia’s main enemy, as a threat because of its support for militias in Lebanon and Yemen and for its backing of President Bashar al-Assad in Syria. Many of Iran’s activities are indeed destabilizing; but Mr. Trump’s friend Vladimir Putin has been no less responsible for keeping Mr. Assad in power.

In some ways Iran is an easy political target. Sunni Arabs feel threatened by Iran and are competing with Iran for regional influence. Israel detests Iran and so do many members of Congress. Yet to see Iran as implacably hostile is much too simple. Even as Mr. Trump reaffirmed America’s partnership with the conservative Saudi royals, Iranians were re-electing a moderate, Hassan Rouhani, as president and reaffirming their interest in engagement with the West.

While Mr. Trump was explicitly not lecturing Sunni Arab leaders on human rights, Secretary of State Rex Tillerson responded to the Iranian election by advising Mr. Rouhani to restore the rights of Iranians to freedom of speech and organization. The Saudi human rights record is no better than Iran’s.