Build secular countries, not Islamic ones.

Daniel Greenfield, a Shillman Journalism Fellow at the Freedom Center, is a New York writer focusing on radical Islam.

Nation-building has become a very controversial term. And with good reason. Our conviction that we can reconstruct any society into another America is unrealistic. It ignores our own exceptionalism and overlooks the cultural causes of many conflicts. It assumes that a change of government and open elections can transform a tribal Islamic society into America. They can’t and won’t.

But it’s also important to recognize that what we have been doing isn’t nation-building, but Islam-building.

Nation-building in Germany and Japan meant identifying a totalitarian ideology, isolating its proponents from political power and recreating a formerly totalitarian state as an open society. That is the opposite of what we did in Afghanistan and Iraq, never mind Egypt, Libya, Tunisia, Yemen and all the rest.

We did temporarily pursue de-Baathification in Iraq. But the Baathists were just Saddam’s cult of personality. Saddam was a problem in Iraq. But he wasn’t the problem in Iraq. His rule was a symptom of the real problem which was the divide between Sunnis and Shiites. The real problem was Islam.

Because we failed to recognize that, de-Baathification failed. The Baathists just folded themselves into ISIS. The Sunni-Shiite war went on even without Saddam. Today Sunnis and Shiites are still killing each other in Iraq much as they had for a long time. We have boiled this war down to ISIS, but ISIS, like Saddam is just another symptom of the political violence and divisiveness inherent in Islam.

Instead of secularizing Iraq, our efforts at democracy only heightened divisions along religious lines. The “Lebanon” model for Iraq with power sharing arrangements between Sunnis and Shiites was doomed.

Iraq’s first election was dominated by the Supreme Council for Islamic Revolution in Iraq. If that name rings a bell, it should. It came out of Iran. You know, the original Islamic Revolution. The “free” election had given a boost to an Islamic terror group whose goal was the creation of an Islamic State in Iraq.

The bloodiest days of the Iraq War actually came when two sets of Islamic terror groups fighting to create an Islamic State began killing each other… and us. We know one of those groups today as ISIS. The other group is the Iraqi government. And a decade later, they’re still killing each other.

Instead of nation-building in Iraq, we practiced Islam-building. Iraq’s constitution made Islam the official religion and the fundamental source of legislation. Its first real law was that, “No law that contradicts the established provisions of Islam may be established.” The new Iraq we had built was an Islamic State.

We did no better in the Islamic Republic of Afghanistan whose constitution declared much the same thing. Its first parliamentary elections saw victories for the National Islamic Movement of Afghanistan and the Islamic Society. As in Iraq and Syria, the distinctions between the bad Islamists and the good Islamists were often fuzzy at best. We had replaced the bad Islamist warlords who raped and murdered their enemies with the good Islamist warlords who raped and murdered their enemies.

Our nation-building had created an Islamic Republic of Afghanistan and an Islamic State in Iraq. It was no wonder that the fighting never stopped.

Matters grew much worse with the Arab Spring when Obama and Hillary’s Islam-building project flipped countries that had been democratic and secular in the loosest sense into the tar pit of political Islam.

Coptic Christians were massacred and churches were burned in Egypt. The Christian communities in Iraq and Syria were threatened with annihilation. The Jewish community in Yemen may be close to disappearing entirely. The Yazidis were raped and murdered on a genocidal scale by the Islamic State.

But in many cases they were just collateral damage from fighting between Sunni and Shiite Islamists, and among Sunni Islamists battling each other for dominance.

The ugliest part of Islam-building was that the resulting conflicts between Islamists and secularists in Egypt and Tunisia highlighted starkly just how wrong our policy was. Instead of backing secular and democratic forces, Obama had thrown in with Islamists. And even after the Muslim Brotherhood was overthrown in Egypt, his administration continued advocating on behalf of its Islamic reign of terror.

If we had practiced actual nation-building, then we would have identified Islamic tribalism as the central corrosive force in Iraq and Afghanistan, and Islamic political movements as the totalitarian threat in Egypt, Libya and Tunisia. Our efforts would have been directed at isolating them and keeping them out of power while working to democratize and secularize these countries on the old Turkish model. It might not have worked, but at least it would have been nation-building, not Islam-building.

Nation-building might very well have failed. America doesn’t have infinite resources and the lives of our soldiers are precious. Assuming that we can upend radically different societies is excessively optimistic.

But we didn’t even try.

What we have been doing in this century isn’t nation building. Instead we’ve been empowering our enemies. We’ve been sticking our hands into Islamist snake pits and playing, “Find the Muslim moderate” and refusing to learn any better no matter how many times we get bitten.

We have been perfectly happy to help the Islamic terrorists that our soldiers were shooting at last week so long as their leader signed some sort of accord paying lip service to equality yesterday. We didn’t just get into bed with the Muslim Brotherhood, but with former affiliates of Al Qaeda and current proxies of Iran. We allied with the Sunni and Shiite Islamist murderers of American soldiers in Iraq.

And all we got for it was more violence, chaos and death.

Even without Islam, ethnic and tribal divisions would have made nation-building into a difficult challenge. But Islam-building didn’t just leave wrecked societies, but terror threats. Tensions between Arabs, Turkmen and Kurds wouldn’t have led to massacres in Paris and Nice. Only Islam could do that.

Islam takes local conflicts and makes them global. That’s why disputes over the authority of the House of Saud led to the mass murder of thousands of people in New York or why Arab attacks on Israel became a burning international issue. Or why Sunni and Shiite feuds in Iraq and Syria led to a massacre of attendees at a rock concert in Paris.

That is also why the combination of Islam and politics in any form is an existential threat to us.

Not only should we not be subsidizing it in any way, shape or form, but we should be doing our best to stamp it out. If we must have any form of nation-building, it should be the building of secular nations in which Islam is isolated and detached from any political involvement.

We have two options for preventing the spread of Islamic political violence into our countries. The first is a ban on Muslim immigration. The second is a ban on Muslim politics. The former has been dubbed isolationism and the latter nation-building. Neither term is truly accurate, but they capture the essence of the choice.

We however have chosen a choice that is far worse than either. We have opened our doors to Muslim migration while opening Muslim countries to further Islamic political involvement. We have Islamized terror states and ourselves. Is it any wonder that we suffer from a severe Islamic terror threat?

Open borders for Islamic terror and Islam-building have led to our current state of national insecurity. We have made the world more dangerous by backing Islamic politics and we have made our countries more dangerous by welcoming in Muslim migrants to be indoctrinated into terror by Islamist organizations. The more we build up Islam, the more we destroy ourselves.