Nearly two decades after 9/11, America is washing its hands of the Middle East — a withdrawal that began with President Barack Obama and has accelerated under his successor, even as the Islamist threat persists.

The pullout of US troops from northern Syria, for example, raises legitimate fears of ISIS ­regrouping — as well as utterly hypocritical criticism from the very Obama-ites who presided over ISIS’s rise.

Lost amid the rancor that ­attends every Trumpian move, however, are the philosophical and theological crises that lie ­behind the Islamist threat.

“The War on Terror started 18 years ago,” says Sheik Mohammed al-Issa, the secretary-general of the Muslim World League, as we sit down for an ­interview in a Ritz Carlton penthouse suite overlooking Central Park. “What do we see now? Has terrorism shrunk or has it ­expanded? There is something wrong with the equation.”

The sheik isn’t opposed to counterterror operations. His point is that military action alone will never be enough to win a war of ideas.

Since assuming leadership of the Mecca-based league in 2016, the former Saudi justice minister has emerged as a force for Islamic moderation. His main project is to change how Muslims understand their own faith — in relation to other religions, to non-Mus­lim-majority states in the case of the Muslim diaspora and, ­especially, reason itself.

God’s reasonableness is a complex question, the subject of a vast theological library. In some strands of Islam, God is believed to be so utterly beyond human understanding that he can ­demand unreasonable violence.

Yet Issa is committed to an eminently reasonable vision of God. All three monotheistic faiths, he tells me, “agree on the existence of God, that he is the Lord of heaven and earth. And all three agree that God’s demands are reasonable. Whether we realize the reasonableness of God’s ­demands, whether we can fully penetrate into it, we all agree that his demands are reasonable.”

Whether Issa’s vision succeeds theologically is for Muslim scholars to judge. But its practical fruits are undeniable.

He has vowed to visit Auschwitz next year to commemorate the 75th anniversary of the camp’s liberation. And in a letter to the US Holocaust Memorial Museum, he decried the Shoah as “an event whose horrors could not be denied or underrated by any fair-minded or peace-loving person” — no small step for a leader in a region where Holocaust-denial is part of the ­ideological air people breathe.

As important, Issa’s league regularly convenes Muslim imams and scholars to change their minds. “We talk to Muslims in non-Muslim countries,” he says. “We tell them to respect the constitutions of the countries where they live and likewise the culture. You have to show compassion and respect for others who hold non-Muslim beliefs.”

He has even called on our own Reps. Rashida Tlaib and Ilhan Omar to promote Muslim integration and to renounce playing the Muslim “victim card.”

His efforts culminated in May in a statement drafted under his auspices and signed in Mecca by some 1,200 Islamic scholars. The Charter of Mecca declares that “all people … are equal under God,” and that Muslims have a special responsibility to “deter the promotion of hatred and the instigation of violence and terrorism.”

How far does Issa take the commitment to reasonable dialogue? He asks an aide to pull up a photo of the sheik standing next to Marine Le Pen, the French nationalist leader, who isn’t exactly known for charitable views of Islam.

“She is a friend now,” the sheik says. “She told me, ‘Why isn’t everyone else teaching what you teach?’ She has the right to say what she wants, especially when she said, ‘I’m not against the existence of Muslims. I have one point: I fear for the French culture, and I don’t want anyone to hurt our culture.’ ”

The sheik’s response: “Me, too” — he is protective of Saudi culture and so understands the non-Muslim majorities’ anxieties about Islam’s place in their societies.

“Those [Muslims] who do not agree with Western concepts,” Issa says, “they are free to leave. They can’t impose their ideologies on the majority. They can use channels like courts, parliaments and so on, but at the end of the day they have to ­respect the laws of the land.”

Fair, but is he also worried about the rise of aggressive secular liberalism in the West, the kind that seeks to banish faith, Islam as much as Christianity, from the public square? “Let’s assume the secularists vote that all religion is wrong,” Issa replies. “Are they going to resort to the same methods like Communism under Soviet Union, to ban all religion?”

Then he adds with a smile: “Look what happened to Soviet Communism 40 years later.”

Sohrab Ahmari is The Post’s op-ed editor. Twitter: @SohrabAhmari